Introduces BulkVectorScorer for ExactSearch - #3361
Conversation
PR Reviewer Guide 🔍(Review updated until commit 42dc5cb)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 42dc5cb Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 46bea86
Suggestions up to commit 8a22b0f
Suggestions up to commit d4d608d
Suggestions up to commit 9e44a73
Suggestions up to commit 86b889b
|
36457a4 to
31cb7d3
Compare
|
Persistent review updated to latest commit 31cb7d3 |
31cb7d3 to
49f2752
Compare
|
Persistent review updated to latest commit 49f2752 |
49f2752 to
c9600a2
Compare
|
Persistent review updated to latest commit c9600a2 |
|
Persistent review updated to latest commit 9ccc599 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3361 +/- ##
============================================
+ Coverage 83.77% 83.86% +0.08%
- Complexity 4371 4418 +47
============================================
Files 454 456 +2
Lines 15789 15961 +172
Branches 2057 2110 +53
============================================
+ Hits 13228 13386 +158
- Misses 1777 1778 +1
- Partials 784 797 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Persistent review updated to latest commit 3d58da6 |
There was a problem hiding this comment.
The refactoring is clean and the BulkVectorScorer abstraction makes the code much more readable Thanks @shatejas , I have one concern though , our Old code https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/index/query/exactsearch/ExactSearcher.java#L227-L248 , we had optimization to skip block if score is less than max score
if (maxScore < topDoc.score) {
continue;
}
Seems like now we are just using wrapper againt Lucene VectorScorer.Bulk interface that logic is missed . @navneet1v that skiping logic for meant for optimizating latency if I am nit wrong?
Signed-off-by: Tejas Shah <shatejas@amazon.com>
Signed-off-by: Tejas Shah <shatejas@amazon.com>
Signed-off-by: Tejas Shah <shatejas@amazon.com>
3d58da6 to
86b889b
Compare
|
Persistent review updated to latest commit 86b889b |
Signed-off-by: Tejas Shah <shatejas@amazon.com>
|
Persistent review updated to latest commit 9e44a73 |
Signed-off-by: Tejas Shah <shatejas@amazon.com>
|
Persistent review updated to latest commit d4d608d |
Signed-off-by: Tejas Shah <shatejas@amazon.com>
|
Persistent review updated to latest commit 8a22b0f |
|
Persistent review updated to latest commit 46bea86 |
|
@shatejas can you please use |
Signed-off-by: Tejas Shah <shatejas@amazon.com>
46bea86 to
42dc5cb
Compare
|
Persistent review updated to latest commit 42dc5cb |
Description
Introduces BulkVectorScorer, a Lucene Scorer implementation that wraps the bulk vector scoring API and encapsulates score filtering logic. This replaces the manual buffer-iteration loops previously spread across ExactSearcher methods, consolidating all exact-search scoring into a single reusable abstraction.
Key changes
Test plan
cost, initial state, empty docs, and edge cases
Related Issues
Partially Resolves #3348
Check List
--signoff.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.