-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Leniency makes simple_query_string query a match_all #7967
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
Labels
Comments
Simple demo:
The above results in a match-all query:
|
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this issue
Oct 22, 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
added a commit
that referenced
this issue
Oct 22, 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
dakrone
added a commit
that referenced
this issue
Oct 22, 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
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I can see since 1.3.3 when query is using "lenient" parameter it yelds results when we have format based failures (at least in 1.3.2 it does not return any results).
When searching by non-existing subfields (i.e. "field.nonexisting") no errors and no results are found (which seems to be correct)
The problem comes when I combine queries from both types - with "lenient" and format failure and with non-existing fields in a "should" boolean query
I'm tested with 1.3.4 version and 1.4.0-beta1
Here are the structure, test data and queries I tested with:
Structure
https://gist.github.com/shoteff/3ee9f2ad320410375c91
Data
https://gist.github.com/shoteff/f5c23bd6bb85f6fecdc9
Queries - here I also described what is working and what not
https://gist.github.com/shoteff/20fa2411ede09068ce95
The text was updated successfully, but these errors were encountered: