Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Keywords: Query / Search / ID

Released: 

Summary

When the vector is stored in Milvus, the corresponding ID will be generated. If the vector to be queried already exists, it will be more efficient to query directly by ID. However, the current version does not support querying by ID. We can only use the ID to retrieve the vector and then use the vector for query, which reduces the efficiency.

...

  • The API of the new function

  • The details on how to support search by ID


Motivation

  1.  Reduce complicated Operation: Without the new function, users need to call the get_entity_by_id() and search() to perform vector querying by id

  2. Low querying efficiency: Calling functions get_entity_by_id() and search() both need to load data into memory, which consume time.

Design Details

A. What is the API of the new function?

Plan (Recommended): The API of the new function is the same as the search() function, except for one parameter: query_record is replaced by query_id

...

       Cons: Not see any.


B. How to search by ID?

Plan B1:Directly use the existing functions search() and get_entity_by_id() to construct new function

...

                  Not see any


Compatibility, Deprecation, and Migration Plan

    Need to merge the new function into 2 python SDKs for Milvus, PyMilvus and PyMilvus-ORM

Test Plan

- need to pass the unittest
- need to pass the basic python test case

Rejected Alternatives

References