SQL: Fix issue with options for QUERY() and MATCH().#33828
Merged
matriv merged 3 commits intoelastic:masterfrom Sep 19, 2018
Merged
SQL: Fix issue with options for QUERY() and MATCH().#33828matriv merged 3 commits intoelastic:masterfrom
matriv merged 3 commits intoelastic:masterfrom
Conversation
Previously multiple comma separated lists of options where not
recognized correctly which resulted in only the last of them
to be taked into account, e.g.:
For the following query:
SELECT * FROM test WHERE QUERY('search', 'default_field=foo', 'default_operator=and')"
only the `default_operator=and` was finally passed to the ES query.
Fixes: elastic#32602
matriv
commented
Sep 18, 2018
| | left=booleanExpression operator=OR right=booleanExpression #logicalBinary | ||
| ; | ||
|
|
||
| matchQueryOptions |
Contributor
Author
There was a problem hiding this comment.
I chose to use this separate marker to avoid confusion in the ExpressionBuilder with string() containing also the queryString argument which had to be skipped.
Member
There was a problem hiding this comment.
Is it possible to not have it as a top-level declaration and use something like options=(',' string)* instead?
Contributor
Author
There was a problem hiding this comment.
Nope, unfortunately not, because of the * wildcard.
costin
approved these changes
Sep 18, 2018
Member
costin
left a comment
There was a problem hiding this comment.
Left a couple of minor comments. LGTM otherwise.
| | left=booleanExpression operator=OR right=booleanExpression #logicalBinary | ||
| ; | ||
|
|
||
| matchQueryOptions |
Member
There was a problem hiding this comment.
Is it possible to not have it as a top-level declaration and use something like options=(',' string)* instead?
...l/src/main/java/org/elasticsearch/xpack/sql/expression/predicate/fulltext/FullTextUtils.java
Show resolved
Hide resolved
Collaborator
|
Pinging @elastic/es-search-aggs |
matriv
pushed a commit
that referenced
this pull request
Sep 19, 2018
Previously multiple comma separated lists of options where not
recognized correctly which resulted in only the last of them
to be taked into account, e.g.:
For the following query:
SELECT * FROM test WHERE QUERY('search', 'default_field=foo', 'default_operator=and')"
only the `default_operator=and` was finally passed to the ES query.
Fixes: #32602
Contributor
Author
|
Backported to |
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Sep 19, 2018
* master: (46 commits) Fixing assertions in integration test (elastic#33833) [CCR] Rename idle_shard_retry_delay to poll_timout in auto follow patterns (elastic#33821) HLRC: Delete ML calendar (elastic#33775) Move DocsStats into Engine (elastic#33835) [Docs] Clarify accessing Date methods in painless (elastic#33560) add elasticsearch-shard tool (elastic#32281) Cut over to unwrap segment reader (elastic#33843) SQL: Fix issue with options for QUERY() and MATCH(). (elastic#33828) Emphasize that filesystem-level backups don't work (elastic#33102) Use the global doc id to generate a random score (elastic#33599) Add minimal sanity checks to custom/scripted similarities. (elastic#33564) Profiler: Don’t profile NEXTDOC for ConstantScoreQuery. (elastic#33196) [CCR] Change FollowIndexAction.Request class to be more user friendly (elastic#33810) SQL: day and month name functions tests locale providers enforcement (elastic#33653) TESTS: Set SO_LINGER = 0 for MockNioTransport (elastic#32560) Test: Relax jarhell gradle test (elastic#33787) [CCR] Fail with a descriptive error if leader index does not exist (elastic#33797) Add ES version 6.4.2 (elastic#33831) MINOR: Remove Some Dead Code in Scripting (elastic#33800) Ensure realtime `_get` and `_termvectors` don't run on the network thread (elastic#33814) ...
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
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.
Previously multiple comma separated lists of options where not
recognized correctly which resulted in only the last of them
to be taked into account, e.g.:
For the following query:
SELECT * FROM test WHERE QUERY('search', 'default_field=foo', 'default_operator=and')"
only the
default_operator=andwas finally passed to the ES query.Fixes: #32602