Mein aktueller Aufbau ist wie folgt:
Code: Select all
from pymilvus import MilvusClient
client = MilvusClient('../data/task_embeddings.db')
client.load_collection('collection')
client.drop_index('collection', 'problem_statement_embeddings') # Ensure clean precondition before trying to create index
client.describe_index('collection', 'problem_statement_embeddings') # Check whether the last statement worked as expected
index_params = MilvusClient.prepare_index_params()
index_params.add_index(
index_name='problem_statement_embeddings',
field_name="vector",
index_type="FLAT",
metric_type="COSINE",
)
client.create_index('collection', index_params, sync=True)
Code: Select all
{'index_type': 'FLAT',
'metric_type': 'COSINE',
'dim': '768',
'field_name': 'vector',
'index_name': 'problem_statement_embeddings',
'total_rows': 0,
'indexed_rows': 0,
'pending_index_rows': 0,
'state': 'Finished'}
Bearbeiten: Ich habe ein Problem im Milvus-Repo geöffnet