Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Jul 3, 2019

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on match_phrase_prefix queries only.

Closes #43308

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on `phrase_prefix` queries only.

Closes elastic#43308
@jimczi jimczi added >bug :Search/Search Search-related issues that do not fall into other categories v7.3.0 v6.8.2 v7.2.1 labels Jul 3, 2019
@jimczi jimczi requested a review from romseygeek July 3, 2019 20:14
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

Good catch! LGTM

@jimczi jimczi merged commit 53f6dcf into elastic:master Jul 4, 2019
@jimczi jimczi deleted the bug/match_phrase_span branch July 4, 2019 07:39
jimczi added a commit that referenced this pull request Jul 4, 2019
)

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on `phrase_prefix` queries only.

Closes #43308
jimczi added a commit that referenced this pull request Jul 4, 2019
)

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on `phrase_prefix` queries only.

Closes #43308
jimczi added a commit that referenced this pull request Jul 4, 2019
)

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on `phrase_prefix` queries only.

Closes #43308
jimczi added a commit that referenced this pull request Jul 4, 2019
)

Disjunction over two individual terms in a phrase query with multi-word synonyms
wrongly applies a prefix query to each of these terms. This change fixes this bug
by inversing the logic to use prefixes on `phrase_prefix` queries only.

Closes #43308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Search/Search Search-related issues that do not fall into other categories v6.8.2 v7.2.1 v7.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Synonym graph causes strange score on match_phrase query

3 participants