-
Notifications
You must be signed in to change notification settings - Fork 376
Open
Labels
kind/bugSomething isn't workingSomething isn't workingmilvus-liteIssues related to milvus-liteIssues related to milvus-lite
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Pymilvus version: 2.6.1
Milvus server version: v2.6.0 (standalone/cluster)
There's an inconsistency in how primary field names are handled between Milvus Lite and Cluster/Standalone modes.
In Milvus Lite mode, the primary field name defaults to "id", while in Cluster/Standalone mode, it uses the actual configured primary field name (e.g., "vs_reserved_field_id").
Expected Behavior
Both modes should consistently use the same primary field name resolution logic.
Steps/Code To Reproduce behavior
Reproduction:
Create a collection with a custom primary field name in both Lite and Cluster modes
Perform a search operation
Check the primary_field_name in the search results.
Added debug print in `_parse_search_result_data()` inside `client.search_result` file:
def _parse_search_result_data(
self,
res: schema_pb2.SearchResultData,
round_decimal: Optional[int],
) -> List[List[Dict[str, Any]]]:
_pk_name = res.primary_field_name or "id"
print("name of the primary field:", _pk_name)
In standalone mode, I can see that the debug statement prints the right configured id, whereas in Lite mode (on disk local db), it prints `id`.
The schema for collection creation is:
{
'auto_id': False,
'description': 'Test Async Organization Order Preference List',
'fields': [
{'name': 'metadata', 'description': 'Additional metadata', 'type': <DataType.JSON: 23>},
{'name': 'vs_reserved_field_id', 'description': 'Document UUID', 'type': <DataType.VARCHAR: 21>, 'params': {'max_length': 36}, 'is_primary': True, 'auto_id': False},
{'name': 'vs_reserved_field_vector', 'description': 'Embedding vector', 'type': <DataType.FLOAT_VECTOR: 101>, 'params': {'dim': 768}}
],
'enable_dynamic_field': False}
}
Environment details
- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source): Docker and Lite
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):
Anything else?
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't workingmilvus-liteIssues related to milvus-liteIssues related to milvus-lite