Skip to content

Do not take duplicate query extractions into account for minimum_should_match attribute #28353

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

Merged
merged 1 commit into from
Jan 30, 2018

Conversation

martijnvg
Copy link
Member

If a percolator query contains duplicate query clauses somewhere in the query tree then
when these clauses are extracted then they should not affect the msm.

This can lead a percolator query that should be a valid match not become a candidate match,
because at query time, the msm that is being used by the CoveringQuery would never match with
the msm used at index time.

PR for #28315

@martijnvg martijnvg added >bug review :Search Relevance/Percolator Reverse search: find queries that match a document v7.0.0 v6.3.0 labels Jan 24, 2018
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

Tricky, the fix looks good to me.

Martijn and I discussed some follow-ups in terms of testing and other things that need to be reviewed.

@martijnvg martijnvg force-pushed the percolator_duplicate_clauses branch from 64836a1 to 4b2d515 Compare January 25, 2018 08:38
…minimum_should_match attribute

If a percolator query contains duplicate query clauses somewhere in the query tree then
when these clauses are extracted then they should not affect the msm.

This can lead a percolator query that should be a valid match not become a candidate match,
because at query time, the msm that is being used by the CoveringQuery would never match with
the msm used at index time.

Closes elastic#28315
@martijnvg
Copy link
Member Author

This PR will be backported to 6.2 branch after 6.2.0 has been released.

@martijnvg
Copy link
Member Author

This has been backported to the 6.2 branch.

jpountz added a commit to jpountz/elasticsearch that referenced this pull request Apr 5, 2018
I found the following bugs:
 - The 6.0 logic for conjunctions didn't work when there were only `match_all`
   queries in MUST/FILTER clauses as they didn't propagate the `matchAllDocs`
   flag.
 - Some queries still had the same issue as `BooleanQuery` used to have with
   duplicate terms (see elastic#28353), eg. `MultiPhraseQuery`.

Closes elastic#29376
jpountz added a commit that referenced this pull request Apr 6, 2018
I found the following bugs:
 - The 6.0 logic for conjunctions didn't work when there were only `match_all`
   queries in MUST/FILTER clauses as they didn't propagate the `matchAllDocs`
   flag.
 - Some queries still had the same issue as `BooleanQuery` used to have with
   duplicate terms (see #28353), eg. `MultiPhraseQuery`.

Closes #29376
jpountz added a commit that referenced this pull request Apr 6, 2018
I found the following bugs:
 - The 6.0 logic for conjunctions didn't work when there were only `match_all`
   queries in MUST/FILTER clauses as they didn't propagate the `matchAllDocs`
   flag.
 - Some queries still had the same issue as `BooleanQuery` used to have with
   duplicate terms (see #28353), eg. `MultiPhraseQuery`.

Closes #29376
jpountz added a commit that referenced this pull request Apr 6, 2018
I found the following bugs:
 - The 6.0 logic for conjunctions didn't work when there were only `match_all`
   queries in MUST/FILTER clauses as they didn't propagate the `matchAllDocs`
   flag.
 - Some queries still had the same issue as `BooleanQuery` used to have with
   duplicate terms (see #28353), eg. `MultiPhraseQuery`.

Closes #29376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Relevance/Percolator Reverse search: find queries that match a document v6.2.2 v6.3.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants