-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparse Index Create Issue after insert data #213
Comments
hi @bdockbockd , can you provide the code? |
Here is my relevant code
Meaningful throw
|
My schema
Before |
It may be because your collection_name is illegal. The following code can run normally. from pymilvus import MilvusClient, DataType
milvus_client = MilvusClient(f'milvus_demo.db')
collection_name="my_collection"
schema = milvus_client.create_schema(
auto_id=True,
enable_dynamic_fields=True,
)
schema.add_field(field_name="pk", datatype=DataType.VARCHAR, is_primary=True, max_length=100)
schema.add_field(field_name="uid", datatype=DataType.VARCHAR, max_length=100)
schema.add_field(field_name="number", datatype=DataType.DOUBLE)
schema.add_field(field_name="sparse_vector", datatype=DataType.SPARSE_FLOAT_VECTOR)
milvus_client.create_collection(collection_name=collection_name, schema=schema)
index_params = milvus_client.prepare_index_params()
index_params.add_index(
field_name="sparse_vector",
index_name="sparse_inverted_index",
index_type="SPARSE_WAND",
metric_type="IP",
params={"drop_ratio_build": 0.2}
)
milvus_client.create_index(collection_name=collection_name, index_params=index_params)
print(milvus_client.list_indexes(collection_name=collection_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Base image: python=3.8.5
The text was updated successfully, but these errors were encountered: