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

Retrieve PartialMatch Only for Match Queries #2103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CascadingRadium
Copy link
Member

  • Previously, we returned the PartialMatch field for every hit when the query
    used a Disjunction Searcher. However, this behavior is incorrect, as the
    PartialMatch attribute is only relevant for Match Queries.

- Earlier we were returning a PartialMatch field for
  every hit if the query used a Disjunction Searcher
  underneath, this does not make sense as the
  PartialMatch attribute is only relevant for Match
  Queries
@abhinavdangeti
Copy link
Member

So just so we're clear here - partial_match will be set if an explicit disjunction were used and all its components did not match yes?
And also separately, if a match query resolves to a disjunction - and if some of the components did not match, we'll now be setting partial_match - correct?

@CascadingRadium
Copy link
Member Author

CascadingRadium commented Nov 21, 2024

  • A match query will be a disjunction query over all the terms, and if the document has all
    the terms then partial_match will be set to false else it will be set to true.
  • For all other queries partial_match will never show up in the search result as its omitempty and will be simply excluded from the search result.

@abhinavdangeti
Copy link
Member

Ok, then I disagree with your proposal here - we should be returning a partial_match when a disjunction's component doesn't match as well.

@CascadingRadium
Copy link
Member Author

CascadingRadium commented Nov 21, 2024

like when the top-most query is a disjunction query ?

@abhinavdangeti
Copy link
Member

like when the top-most query is a disjunction query ?

Ya.

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.

2 participants