Skip to content
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

[Backport 2.x] Fix setting rescore as false in on_disk knn_vector query #2420

Merged

Conversation

e-emoto
Copy link
Contributor

@e-emoto e-emoto commented Jan 22, 2025

Description

Backport of #2399
Skip Flaky BWC in #2417

This change adds a flag to RescoreContext for tracking if rescore has been disabled by the KNN query parameters. This flag is set to not skip rescore by default, and is only set to skip rescore if "rescore": false is in the KNN query. UTs were added for the KNNQueryBuilderParser that covers the different cases for rescore. The below steps were also run with a debugging cluster to verify that the rescore was being run/skipped correctly based on the query parameters.

Related Issues

Resolves #2360

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

…project#2399)

* Fix setting rescore as false in on_disk knn_vector query

Signed-off-by: Ethan Emoto <[email protected]>
Signed-off-by: Ethan Emoto <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Ethan Emoto <[email protected]>
Signed-off-by: Ethan Emoto <[email protected]>

* Reapply Spotless Java

Signed-off-by: Ethan Emoto <[email protected]>
Signed-off-by: Ethan Emoto <[email protected]>

* Add IT for testing rescore enabled and disabled

Signed-off-by: Ethan Emoto <[email protected]>
Signed-off-by: Ethan Emoto <[email protected]>

---------

Signed-off-by: Ethan Emoto <[email protected]>
Signed-off-by: Ethan Emoto <[email protected]>
(cherry picked from commit 387344e)
Signed-off-by: Ethan Emoto <[email protected]>
@e-emoto e-emoto force-pushed the backport/backport-2399-to-2.x branch from c37ebde to 7516b69 Compare January 23, 2025 23:12
@jmazanec15 jmazanec15 merged commit 780bf49 into opensearch-project:2.x Jan 24, 2025
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants