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

Make simple_query_string leniency more fine-grained #8162

Merged
merged 1 commit into from Oct 22, 2014

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Oct 20, 2014

Previously, the leniency was on a per-query basis, with each query being
parsed into multiple queries, one for each field. If any one of these
queries failed, the entire query was discarded in the name of being
lenient.

Now query parts will only be discarded if they fail for a particular
field, the entire query is not discarded. This helps when performing a
query over a numeric and string field, as only the sub-queries that are
invalid due to format exceptions will be discarded.

Also moves the simple_query_string queries out of SimpleQueryTests and
into a dedicated SimpleQueryStringTests class.

Fixes #7967

@s1monw
Copy link
Contributor

s1monw commented Oct 21, 2014

LGTM

@s1monw s1monw removed the review label Oct 21, 2014
Previously, the leniency was on a per-query basis, with each query being
parsed into multiple queries, one for each field. If any one of these
queries failed, the entire query was discarded in the name of being
lenient.

Now query parts will only be discarded if they fail for a particular
field, the entire query is not discarded. This helps when performing a
query over a numeric and string field, as only the sub-queries that are
invalid due to format exceptions will be discarded.

Also moves the `simple_query_string` queries out of SimpleQueryTests and
into a dedicated SimpleQueryStringTests class.

Fixes elastic#7967
@dakrone dakrone merged commit 26bc940 into elastic:master Oct 22, 2014
@clintongormley clintongormley changed the title Make simple_query_string leniency more fine-grained Query DSL: Make simple_query_string leniency more fine-grained Nov 3, 2014
@dakrone dakrone deleted the sqs-lenient-too-lenient branch November 11, 2014 12:42
@clintongormley clintongormley changed the title Query DSL: Make simple_query_string leniency more fine-grained Make simple_query_string leniency more fine-grained Jun 7, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
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 v1.4.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leniency makes simple_query_string query a match_all
3 participants