Skip to content

utility.wait_for_index_building_complete() return but index creation not finished? #42145

Discussion options

You must be logged in to vote

create_index() is called before insert():

import random

from pymilvus import (
    connections,
    FieldSchema, CollectionSchema, DataType,
    Collection,
    utility,
)

connections.connect(host='localhost', port=19530, user="root", password="Milvus")
print(utility.get_server_version())

collection_name = "CCC"
dim = 512

fields = [
    FieldSchema(name="id", dtype=DataType.INT64, is_primary=True),
    FieldSchema(name="vector", dtype=DataType.FLOAT_VECTOR, dim=dim),
]
schema = CollectionSchema(fields)
utility.drop_collection(collection_name)
collection = Collection(collection_name, schema)
print(collection_name, "created")

collection.create_index(field_name="vector", index_params={
…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by xu664
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants