pymilvus
pymilvus copied to clipboard
Output of search result is not easy to read
from https://github.com/milvus-io/pymilvus-orm/issues/192
issue from slack channel
>>> results = collection.search(vectors[:5], field_name, param=search_params, limit=10, expr=None)
>>> results[0].ids
[424363819726212428, 424363819726212436, ...]
>>> results[0].distances
[0.0, 1.0862197875976562, 1.1029295921325684, ...]
I wonder why pymilvus returns data like this. As an application developer, this data structure is not very easy to use. especially if we are going to add more data type in Milvus Can we just output something like this?
[
{
'id': 424363819726212428,
'field': field-value,
'distance': 0
},
{
'id': 424363819726212428,
'field': field-value,
'distance': 1
},
...
]
I think to exchange row-column format will have some performance impact, maybe if it could provide a parameter, so that user can decide which format is preferred.