Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Output of search result is not easy to read #192

Closed
XuanYang-cn opened this issue Jun 24, 2021 · 1 comment
Closed

Output of search result is not easy to read #192

XuanYang-cn opened this issue Jun 24, 2021 · 1 comment

Comments

@XuanYang-cn
Copy link
Contributor

XuanYang-cn commented Jun 24, 2021

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
     },
     ...
]
@XuanYang-cn XuanYang-cn changed the title Output of rearch result is not easy to read Output of search result is not easy to read Jul 6, 2021
@XuanYang-cn
Copy link
Contributor Author

moved into milvus-io/pymilvus#672, closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant