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

fix: opensearch script score with filters #3321

Merged
merged 4 commits into from
Oct 6, 2022
Merged

Conversation

tstadel
Copy link
Member

@tstadel tstadel commented Oct 4, 2022

Related Issues

Proposed Changes:

set filter properly according to https://opensearch.org/docs/latest/search-plugins/knn/knn-score-script/

How did you test it?

  • ran locally against opensearch
  • adjusted unittests

Notes for the reviewer

I thought about adding the filters logic to _get_vector_similarity_query, however this also need refactoring of ElastisearchDocumentStore. Given that there is already a PR for better script_score support underway in #3284 I kept the changes to a minimum.

Checklist

@tstadel tstadel marked this pull request as ready for review October 4, 2022 18:04
@tstadel tstadel requested a review from a team as a code owner October 4, 2022 18:04
@tstadel tstadel requested review from vblagoje and removed request for a team October 4, 2022 18:04
Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tstadel tstadel merged commit b84a6b1 into main Oct 6, 2022
@tstadel tstadel deleted the fix_os_script_score_filter branch October 6, 2022 13:41
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.

OpenSearchDocumentStore script score query with filters is invalid
2 participants