Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- feat(indexes): add source_column field to index responses

## [0.4.1] - 2026-06-19

### Changed
Expand Down
1 change: 1 addition & 0 deletions docs/IndexEntryResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**index_name** | **str** | |
**index_type** | **str** | |
**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional]
**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional]
**status** | [**IndexStatus**](IndexStatus.md) | |
**updated_at** | **datetime** | |
**connection_id** | **str** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/IndexInfoResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**index_name** | **str** | |
**index_type** | **str** | |
**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional]
**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional]
**status** | [**IndexStatus**](IndexStatus.md) | |
**updated_at** | **datetime** | |

Expand Down
1 change: 1 addition & 0 deletions docs/JobResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Name | Type | Description | Notes
**index_name** | **str** | |
**index_type** | **str** | |
**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional]
**source_column** | **str** | Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes. | [optional]
**updated_at** | **datetime** | |

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/QueryApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Name | Type | Description | Notes
**202** | Query submitted asynchronously | - |
**400** | Invalid request (no database specified, or header/body database_id conflict) | - |
**404** | Database not found | - |
**429** | Too many concurrent queries; retry after the Retry-After delay | - |
**429** | The engine was too busy to run this query right now — too many concurrent queries, or not enough memory available (often because of other queries running at the same time). Retry after the Retry-After delay; if it persists, narrowing the query (add a filter or LIMIT) may help. | - |
**500** | Internal server error | - |
**503** | Result store temporarily unavailable (a truncated result could not be persisted); retry after the Retry-After delay | - |

Expand Down
4 changes: 3 additions & 1 deletion hotdata/models/index_entry_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ class IndexEntryResponse(BaseModel):
index_name: StrictStr
index_type: StrictStr
metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.")
source_column: Optional[StrictStr] = Field(default=None, description="Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes.")
status: IndexStatus
updated_at: datetime
connection_id: Optional[StrictStr] = None
schema_name: StrictStr
table_name: StrictStr
__properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at", "connection_id", "schema_name", "table_name"]
__properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "source_column", "status", "updated_at", "connection_id", "schema_name", "table_name"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -102,6 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"index_name": obj.get("index_name"),
"index_type": obj.get("index_type"),
"metric": obj.get("metric"),
"source_column": obj.get("source_column"),
"status": obj.get("status"),
"updated_at": obj.get("updated_at"),
"connection_id": obj.get("connection_id"),
Expand Down
9 changes: 8 additions & 1 deletion hotdata/models/index_info_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ class IndexInfoResponse(BaseModel):
index_name: StrictStr
index_type: StrictStr
metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.")
source_column: Optional[StrictStr] = Field(default=None, description="Source text column for an embedding-backed vector index. A query searches it via `vector_distance(<source_column>, …)`; the indexed `columns` hold the generated embedding column instead. Absent for BM25, sorted, and direct (existing-column) vector indexes.")
status: IndexStatus
updated_at: datetime
__properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "status", "updated_at"]
__properties: ClassVar[List[str]] = ["columns", "created_at", "index_name", "index_type", "metric", "source_column", "status", "updated_at"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.metric is None and "metric" in self.model_fields_set:
_dict['metric'] = None

# set to None if source_column (nullable) is None
# and model_fields_set contains the field
if self.source_column is None and "source_column" in self.model_fields_set:
_dict['source_column'] = None

return _dict

@classmethod
Expand All @@ -99,6 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"index_name": obj.get("index_name"),
"index_type": obj.get("index_type"),
"metric": obj.get("metric"),
"source_column": obj.get("source_column"),
"status": obj.get("status"),
"updated_at": obj.get("updated_at")
})
Expand Down
1 change: 1 addition & 0 deletions test/test_index_entry_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> IndexEntryResponse:
index_name = '',
index_type = '',
metric = '',
source_column = '',
status = 'ready',
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
connection_id = '',
Expand Down
1 change: 1 addition & 0 deletions test/test_index_info_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> IndexInfoResponse:
index_name = '',
index_type = '',
metric = '',
source_column = '',
status = 'ready',
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
)
Expand Down
1 change: 1 addition & 0 deletions test/test_job_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def make_instance(self, include_optional) -> JobResult:
index_name = '',
index_type = '',
metric = '',
source_column = '',
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
)
else:
Expand Down
2 changes: 2 additions & 0 deletions test/test_list_indexes_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> ListIndexesResponse:
index_name = '',
index_type = '',
metric = '',
source_column = '',
status = 'ready',
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), )
]
Expand All @@ -60,6 +61,7 @@ def make_instance(self, include_optional) -> ListIndexesResponse:
index_name = '',
index_type = '',
metric = '',
source_column = '',
status = 'ready',
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), )
],
Expand Down
Loading