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

SQL: Use underlying exact field for LIKE/RLIKE #39443

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

matriv
Copy link
Contributor

@matriv matriv commented Feb 27, 2019

Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: #39442

Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: elastic#39442
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@costin costin 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

@matriv matriv merged commit 2a5d0a3 into elastic:master Feb 27, 2019
@matriv matriv deleted the mt/fix-39442 branch February 27, 2019 13:45
matriv added a commit that referenced this pull request Feb 27, 2019
Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: #39442
matriv added a commit that referenced this pull request Feb 27, 2019
Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: #39442
matriv added a commit that referenced this pull request Feb 27, 2019
Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: #39442
matriv added a commit that referenced this pull request Feb 27, 2019
Previously, if a text field had an underlying keyword field
the latter was not used instead of the text leading to wrong
results returned by queries filtering with LIKE/RLIKE.

Fixes: #39442
@matriv
Copy link
Contributor Author

matriv commented Feb 27, 2019

Backported to 7.x with a2c07b5
to 7.0 with cfa6173
to 6.7 with 1608c9a
to 6.6 with 2075ca8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: LIKE/RLIKE don't use underlying exact field
6 participants