diff --git a/python/python/lancedb/remote/table.py b/python/python/lancedb/remote/table.py index c6a0078b..85b7e789 100644 --- a/python/python/lancedb/remote/table.py +++ b/python/python/lancedb/remote/table.py @@ -111,6 +111,7 @@ class RemoteTable(Table): num_sub_vectors: Optional[int] = None, replace: Optional[bool] = None, accelerator: Optional[str] = None, + index_type="vector", ): """Create an index on the table. Currently, the only parameters that matter are @@ -166,7 +167,6 @@ class RemoteTable(Table): "replace is not supported on LanceDB cloud." "Existing indexes will always be replaced." ) - index_type = "vector" data = { "column": vector_column_name, diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index b08c9de5..61a8f7e8 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -1173,11 +1173,12 @@ class LanceTable(Table): replace: bool = True, accelerator: Optional[str] = None, index_cache_size: Optional[int] = None, + index_type="IVF_PQ", ): """Create an index on the table.""" self._dataset_mut.create_index( column=vector_column_name, - index_type="IVF_PQ", + index_type=index_type, metric=metric, num_partitions=num_partitions, num_sub_vectors=num_sub_vectors,