-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Search fix: query_string regex searches not working on wildcard fields #60959
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests to follow - just checking this doesn’t break things here Closes elastic#60957
…uery construction to the underlying field type
jimczi
approved these changes
Aug 11, 2020
Contributor
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one comment regarding the test, LGTM otherwise
| track_total_hits: true | ||
| query: | ||
| query_string: | ||
| query: "hello*" |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a prefix query ?
markharwood
added a commit
to markharwood/elasticsearch
that referenced
this pull request
Aug 12, 2020
…ard fields (elastic#60959) The Query string parser was not delegating the construction of wildcard/regex queries to the underlying field type. The wildcard field has special data structures and queries that operate on them so cannot rely on the basic regex/wildcard queries that were being used for other fields. Closes elastic#60957
markharwood
added a commit
that referenced
this pull request
Aug 12, 2020
…ard fields (#60959) (#61010) The Query string parser was not delegating the construction of wildcard/regex queries to the underlying field type. The wildcard field has special data structures and queries that operate on them so cannot rely on the basic regex/wildcard queries that were being used for other fields. Closes #60957
markharwood
added a commit
to markharwood/elasticsearch
that referenced
this pull request
Aug 12, 2020
…ard fields (elastic#60959) The Query string parser was not delegating the construction of wildcard/regex queries to the underlying field type. The wildcard field has special data structures and queries that operate on them so cannot rely on the basic regex/wildcard queries that were being used for other fields. Closes elastic#60957
markharwood
added a commit
that referenced
this pull request
Aug 12, 2020
…ard fields (#60959) (#61013) The Query string parser was not delegating the construction of wildcard/regex queries to the underlying field type. The wildcard field has special data structures and queries that operate on them so cannot rely on the basic regex/wildcard queries that were being used for other fields. Closes #60957
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 14, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in elastic#60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes elastic#62267
cbuescher
pushed a commit
that referenced
this pull request
Sep 14, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in #60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes #62267
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 14, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in elastic#60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes elastic#62267
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this pull request
Sep 14, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in elastic#60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes elastic#62267
This was referenced Sep 14, 2020
cbuescher
pushed a commit
that referenced
this pull request
Sep 14, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in #60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes #62267
cbuescher
pushed a commit
that referenced
this pull request
Sep 16, 2020
Disabling the `query_string` queries `allow_leading_wildcard` parameter didn't work after a change probably introduced in #60959 because the various field types `wildcardQuery` don't check the leading characters like QueryParserBase#getWildcardQuery does. This PR adds the missing check also before calling the field types wildcard generating method. Closes #62267
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additional tests to follow - just checking this change doesn’t break existing tests here.
I have BWC concerns re forced user choices of analyzer.
Closes #60957