opensearch-project / k-NN

🆕 Find the k-nearest neighbors (k-NN) for your vector data
https://opensearch.org/docs/latest/search-plugins/knn/index/
Apache License 2.0
156 stars 123 forks source link

Add support for radial search in exact search #2174

Closed VijayanB closed 1 month ago

VijayanB commented 1 month ago

Description

When threshold value is set, knn plugin will not be creating graph. Hence, when search request is trigged during that time, exact search will return valid results. However, radial search was never included as part of exact search. This will break radial search when threshold is added and radial search is requested. In this commit, new method is introduced to accept min score and return documents that are greater than min score, similar to how radial search is performed by native engines. This search is independent of engine, but, radial search is supported only for FAISS engine out of all native engines.

Related Issues

Part of #1942

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

VijayanB commented 1 month ago

This depends on https://github.com/opensearch-project/k-NN/pull/2136

VijayanB commented 1 month ago

I am skipping changelog. While merging back to main will update changelog.

VijayanB commented 1 month ago

There doesn't seem to be updates in unit tests, will it be present in another iteration?

Added unit test