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 alias resolution in match query with synonyms #76688

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

jtibshirani
Copy link
Contributor

When backporting #68795, we introduced a regression around match queries on
field aliases. If the match query parses to a synonym query (because its
analyzer can produce multiple tokens at a single position), then we don't
resolve the field alias to its concrete field. This means the query will not
have any results.

We already had a test for this case but it was too narrow. Note this regression
only affects 7.x, there is no bug on master.

@jtibshirani jtibshirani added >regression :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.14.1 v7.15.0 labels Aug 18, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@jtibshirani
Copy link
Contributor Author

Thanks @nik9000 !

@jtibshirani jtibshirani merged commit d0bfad8 into elastic:7.x Aug 23, 2021
@jtibshirani jtibshirani deleted the match-query branch August 23, 2021 22:41
jtibshirani added a commit that referenced this pull request Aug 23, 2021
When backporting #68795, we introduced a regression around `match` queries on
field aliases. If the `match` query parses to a `synonym` query (because its
analyzer can produce multiple tokens at a single position), then we don't
resolve the field alias to its concrete field. This means the query will not
have any results.

We already had a test for this case but it was too narrow. Note this regression
only affects 7.x, there is no bug on master.
jtibshirani added a commit that referenced this pull request Aug 23, 2021
When backporting #68795, we introduced a regression around `match` queries on
field aliases. If the `match` query parses to a `synonym` query (because its
analyzer can produce multiple tokens at a single position), then we don't
resolve the field alias to its concrete field. This means the query will not
have any results.

We already had a test for this case but it was too narrow. Note this regression
only affects 7.x, there is no bug on master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>regression :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.14.1 v7.15.0 v7.16.0 v8.0.0-alpha2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants