I have created a Milvus connection where i have hosted in an external server. I am not aware of what data is stored in the collection and want to retrieve the data stored in the collection. below is the code that i am using to get the data from the collection but it is not working
from pymilvus import MilvusClient
# 1. Set up a milvus client
client = MilvusClient(
uri="http://localhost:19530",
token="root:Milvus"
)
res = client.query(
collection_name="test_collection",
filter="_id >= 0",
limit=5,
)
print(res)
Error:
MilvusException: <MilvusException: (code=0, message=cannot parse expression: _id >= 0, error: there is no dynamic json field in schema, need to specified field name)>
Then I tried to describe the collection
collection_info = client.describe_collection("test_collection")
print(collection_info)
{'collection_name': 'test_collection',
'auto_id': False,
'num_shards': 1,
'description': '',
'fields': [{'field_id': 100,
'name': 'id',
'description': '',
'type': <DataType.INT64: 5>,
'params': {},
'is_primary': True},
{'field_id': 101,
'name': 'embedding',
'description': '',
'type': <DataType.FLOAT_VECTOR: 101>,
'params': {'dim': 384}}],
'aliases': [],
'collection_id': 450513023365271287,
'consistency_level': 0,
'properties': {},
'num_partitions': 1,
'enable_dynamic_field': False}
Can anyone help me resolving this?
Did you store anything in the collection? Can you see data using Attu or CLI?