-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method to create empty query collector context with customizable score mode #16660
base: main
Are you sure you want to change the base?
Add method to create empty query collector context with customizable score mode #16660
Conversation
54c8785
to
30dd1ab
Compare
…score mode Signed-off-by: Martin Gaievski <[email protected]>
30dd1ab
to
484d820
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16660 +/- ##
============================================
+ Coverage 71.99% 72.09% +0.10%
- Complexity 65153 65186 +33
============================================
Files 5318 5318
Lines 303903 303909 +6
Branches 43970 43970
============================================
+ Hits 218804 219114 +310
+ Misses 67138 66817 -321
- Partials 17961 17978 +17 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
server/src/main/java/org/opensearch/search/query/QueryCollectorContext.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Martin Gaievski <[email protected]>
server/src/main/java/org/opensearch/search/query/QueryCollectorContext.java
Show resolved
Hide resolved
Signed-off-by: Martin Gaievski <[email protected]>
990ab39
to
65bcf14
Compare
❕ Gradle check result for 65bcf14: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
server/src/main/java/org/opensearch/search/query/QueryCollectorContext.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Martin Gaievski <[email protected]>
return ScoreMode.COMPLETE_NO_SCORES; | ||
} | ||
}; | ||
private static Collector createEmptyCollector(ScoreMode scoreMode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please reference the relevant Apache Lucene issue as we've discussed, so it will be clear why we are doing score mode "dance", thanks!
Description
This PR introduces a new method that allows clients to create an empty query collector context with a specified score mode. This enhancement addresses limitations in the current MultiCollector implementation where score modes can default to suboptimal values.
Related Issues
Resolves #16659
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.