-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 a flag in QueryShardContext to differentiate inner hit query #16600
Conversation
❌ Gradle check result for 11f7980: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…ry and an inner hit query Signed-off-by: Heemin Kim <heemin@amazon.com>
11f7980
to
7f16389
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16600 +/- ##
============================================
- Coverage 72.15% 72.04% -0.11%
+ Complexity 65128 65065 -63
============================================
Files 5315 5315
Lines 303573 303578 +5
Branches 43925 43925
============================================
- Hits 219036 218707 -329
- Misses 66565 66940 +375
+ Partials 17972 17931 -41 ☔ View full report in Codecov by Sentry. |
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.
Thanks, @heemin32. This makes sense!
…ry and an inner hit query (#16600) (#16620) (cherry picked from commit c9edb48) Signed-off-by: Heemin Kim <heemin@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Michael Froh <froh@amazon.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Froh <froh@amazon.com>
Description
Add a flag in QueryShardContext to differentiate inner hit query and normal query.
For k-NN nested fields, the query currently searches for the nested field document with the highest score for each parent document, returning only a single nested field document in the inner hit block. We want to modify this query behavior to retrieve all nested field documents in the inner hit block, rather than just the one with the highest score. To implement this, we need to identify whether the current query request is targeting an inner hit block or not.
Alternatives
NestedInnerHitContextBuilder
. This will increase query latency.Related Issues
Resolves opensearch-project/k-NN#2249
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.