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

Optimizes live docs computes for force merge in NativeEngines990KNNVectorWriter #2135

Closed shatejas closed 1 month ago

shatejas commented 2 months ago

Description

Currently live docs are computed with linear complexity even when it does not have deleted docs. This PR skips computing it

Testing

Related Issues

https://github.com/opensearch-project/k-NN/issues/2134

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.

navneet1v commented 2 months ago

Please also update the changelog.

shatejas commented 1 month ago

After more experiments we figured that this live docs iteration is not the root cause, This only yields 32ms gains for 1.6M vectors adding an overhead of maintaining the merge vectors code.

Decided to discard this