fix: error msg when query vector dim is wrong (#1339)

- changed the error msg for table.search with wrong query vector dim 
- added missing fields for listIndices and indexStats to be consistent
with Python API - will make changes in node integ test
This commit is contained in:
QianZhu
2024-05-31 10:18:06 -07:00
committed by GitHub
parent af65417d19
commit 1dbb4cd1e2
5 changed files with 31 additions and 9 deletions

View File

@@ -704,6 +704,9 @@ export interface VectorIndex {
export interface IndexStats {
numIndexedRows: number | null
numUnindexedRows: number | null
index_type: string | null
distance_type: string | null
completed_at: string | null
}
/**

View File

@@ -509,7 +509,8 @@ export class RemoteTable<T = number[]> implements Table<T> {
return (await results.body()).indexes?.map((index: any) => ({
columns: index.columns,
name: index.index_name,
uuid: index.index_uuid
uuid: index.index_uuid,
status: index.status
}))
}
@@ -520,7 +521,10 @@ export class RemoteTable<T = number[]> implements Table<T> {
const body = await results.body()
return {
numIndexedRows: body?.num_indexed_rows,
numUnindexedRows: body?.num_unindexed_rows
numUnindexedRows: body?.num_unindexed_rows,
index_type: body?.index_type,
distance_type: body?.distance_type,
completed_at: body?.completed_at
}
}