Skip to content

I realized that when I tried to search it returns nothing, how to solve this? #33556

Discussion options

You must be logged in to vote

Data visibility is controlled by consistency_level: https://milvus.io/docs/consistency.md#Consistency

Add consistency_level="Strong" to search() and you will see the result:

from pymilvus import (
    DataType,

    MilvusClient,
)

milvusClient = MilvusClient("http://localhost:19530")

dim = 128
collection_name = "XXX"
schema = MilvusClient.create_schema(auto_id=True, enable_dynamic_field=True, primary_field="id")

schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
schema.add_field(field_name="source", datatype=DataType.VARCHAR, max_length=50000)
schema.add_field(field_name="embeddings", datatype=DataType.FLOAT_VECTOR, dim=dim)

index_params = MilvusClient.prepar…

Replies: 1 comment

Comment options

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