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
152 stars 113 forks source link

[Backport 2.x] Changes NativeEngineKNNQuery to execute search and rescore in (#2014) #2016

Closed shatejas closed 4 weeks ago

shatejas commented 4 weeks ago

createWeight phase

rewrite is executed in QueryPhase and FetchPhase in opensearch, this increases the query latency. As an alternative, the search logic is moved to createWeight phase. This will only be used when there is a rescore context present, as a result this will only execute when the mode is set to on-disk

Signed-off-by: Tejas Shah shatejas@amazon.com (cherry picked from commit 9dbe7de078616da9d95c27883c468c4ef4b7df4a)

Description

Backport for https://github.com/opensearch-project/k-NN/pull/2014

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.