Commit Graph

5 Commits

Author SHA1 Message Date
Jim Ferenczi 9d6fac809c Expose splitOnWhitespace in `Query String Query` (#20965)
This change adds an option called `split_on_whitespace` which prevents the query parser to split free text part on whitespace prior to analysis. Instead the queryparser would parse around only real 'operators'. Default to true.
For instance the query `"foo bar"` would let the analyzer of the targeted field decide how the tokens should be splitted.
Some options are missing in this change but I'd like to add them in a follow up PR in order to be able to simplify the backport in 5.x. The missing options (changes) are:
* A `type` option which similarly to the `multi_match` query defines how the free text should be parsed when multi fields are defined.
* Simple range query with additional tokens like ">100 50" are broken when `split_on_whitespace` is set to false. It should be possible to preserve this syntax and make the parser aware of this special syntax even when `split_on_whitespace` is set to false.
* Since all this options would make the `query_string_query` very similar to a match (multi_match) query we should be able to share the code that produce the final Lucene query.
2016-11-02 10:00:40 +01:00
Adrien Grand a4cb63b98c Remove `_missing_` from the docs.
It is removed in 5.0, see #15153.
2016-08-01 16:57:37 +02:00
Clinton Gormley 685a0462d8 Merge pull request #13894 from dmland/patch-1
Update query-string-syntax.asciidoc
2015-11-18 15:50:30 +01:00
Clinton Gormley 171687d207 Docs: Reorganised the Query DSL docs into families and explaing query vs filter context 2015-06-04 01:59:37 +02:00
Adrien Grand a0af88e996 Query DSL: Remove filter parsers.
This commit makes queries and filters parsed the same way using the
QueryParser abstraction. This allowed to remove duplicate code that we had
for similar queries/filters such as `range`, `prefix` or `term`.
2015-05-07 20:14:34 +02:00