object_api.create
vector_search.object_api.create(uri, index_type, object_reader, embedding, config=None, storage_version=STORAGE_VERSION, metadata_tile_size=10000, **kwargs)
Creates a new ObjectIndex.
Parameters
Name | Type | Description | Default |
---|---|---|---|
uri |
str | The URI of the index. | required |
index_type |
str | The type of index to create. Can be one of “FLAT”, “IVF_FLAT”, “VAMANA”, or “IVF_PQ”. | required |
object_reader |
ObjectReader | The object reader to use for the index. | required |
embedding |
ObjectEmbedding | The embedding function to use for the index. | required |
config |
Optional[Mapping[str, Any]] | TileDB config dictionary. | None |
storage_version |
str | The storage version to use for the index. | STORAGE_VERSION |
**kwargs |
Keyword arguments to pass to the index constructor. | {} |
Returns
Type | Description |
---|---|
ObjectIndex | The newly created ObjectIndex. |