File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
apis/python/src/tiledb/vector_search Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,13 @@ def __init__(
3636 ctx = self .ctx ,
3737 config = config ,
3838 )
39- self .ids_uri = self .group [
40- storage_formats [self .storage_version ]["IDS_ARRAY_NAME" ] + self .index_version
41- ].uri
42- if tiledb .array_exists (self .ids_uri , self .ctx ):
39+
40+ # Check for existence of ids array. Previous versions were not using external_ids in the ingestion assuming
41+ # that the external_ids were the position of the vector in the array.
42+ if storage_formats [self .storage_version ]["IDS_ARRAY_NAME" ] + self .index_version in self .group :
43+ self .ids_uri = self .group [
44+ storage_formats [self .storage_version ]["IDS_ARRAY_NAME" ] + self .index_version
45+ ].uri
4346 self ._ids = read_vector_u64 (self .ctx , self .ids_uri , 0 , 0 )
4447 else :
4548 self ._ids = StdVector_u64 (np .arange (self .size ).astype (np .uint64 ))
You can’t perform that action at this time.
0 commit comments