Versions Compared

Key

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

...

This MEP is about how to realize "range search" functionality. User specifies a range scope -- including radius low bound and radius high bound, Milvus does will do "range search" to get , and return TOPK sorted results with distance falling in this range.

...

Range search completely reuses the call stack from SDK to segcore, then to knowhere.


Image Added

Range search only needs to put the parameter "radius_low_bound" and "radius_high_bound" into the search parameter "param" from the SDK.

...


Segcore search flow will be updated as this flow chart, range search related change is marked RED.

Image Added

In API query::SearchOnSealedIndex() and BruteForceSearch(), when "radius_low_bound"

...

and "radius_high_bound"

...

are set, range search is called; otherwise, search is called. 

For API query::SearchOnSealedIndex(), the result returned by knowhere::QueryByRange() will be sorted and filtered, only results with distance falling in the range scope will be returned.

The same as API BruteForceSearch(), the result returned by knowhere::BruteForce::RangeSearch() will be sorted and filtered, only results with distance falling in the range scope will be returned.

The output of range search is exactly as same as the result of search.

  • seg_offsets_: with length "nq * topk", -1 is filled in when no enough result data
  • distances_: with lengh "nq * topk", data is undefined when no enough result data


Range search related new APIs CheckRangeSearch(), QueryByRange() and BruteForce::RangeSearch() are available since knowhere-v1.3.0.



Compatibility, Deprecation, and Migration Plan(optional)

There is no interface change and no compatibility issue.

Test Plan(required)

...

Current proposal is better than the previous one in all respects.

References(optional)

Milvus Search Flow

Image Removed

Segcore Search Flow

...