[Docs]: Clarify query_string parser splits on operator
This commit is contained in:
parent
17714acb9e
commit
4a9995145c
|
@ -98,7 +98,7 @@ public class QueryStringQueryBuilder extends AbstractQueryBuilder<QueryStringQue
|
|||
.withAllDeprecated("Decision is now made by the analyzer");
|
||||
private static final ParseField TIME_ZONE_FIELD = new ParseField("time_zone");
|
||||
private static final ParseField SPLIT_ON_WHITESPACE = new ParseField("split_on_whitespace")
|
||||
.withAllDeprecated("This setting is ignored, the parser always splits on logical operator");
|
||||
.withAllDeprecated("This setting is ignored, the parser always splits on operator");
|
||||
private static final ParseField ALL_FIELDS_FIELD = new ParseField("all_fields")
|
||||
.withAllDeprecated("Set [default_field] to `*` instead");
|
||||
private static final ParseField TYPE_FIELD = new ParseField("type");
|
||||
|
|
|
@ -85,7 +85,7 @@ import static org.elasticsearch.common.lucene.search.Queries.newUnmappedFieldQue
|
|||
/**
|
||||
* A {@link XQueryParser} that uses the {@link MapperService} in order to build smarter
|
||||
* queries based on the mapping information.
|
||||
* This class uses {@link MultiMatchQuery} to build the text query around logical operators and {@link XQueryParser}
|
||||
* This class uses {@link MultiMatchQuery} to build the text query around operators and {@link XQueryParser}
|
||||
* to assemble the result logically.
|
||||
*/
|
||||
public class QueryStringQueryParser extends XQueryParser {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
* The `split_on_whitespace` parameter for the `query_string` query has been removed.
|
||||
If provided, it will be ignored and issue a deprecation warning.
|
||||
The `query_string` query now splits on logical operator only.
|
||||
The `query_string` query now splits on operator only.
|
||||
|
||||
* The `use_dismax` parameter for the `query_string` query has been removed.
|
||||
If provided, it will be ignored and issue a deprecation warning.
|
||||
|
|
|
@ -18,7 +18,7 @@ GET /_search
|
|||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
The `query_string` query parses the input and splits text around logical operators.
|
||||
The `query_string` query parses the input and splits text around operators.
|
||||
Each textual part is analyzed independently of each other. For instance the following query:
|
||||
|
||||
[source,js]
|
||||
|
@ -28,14 +28,14 @@ GET /_search
|
|||
"query": {
|
||||
"query_string" : {
|
||||
"default_field" : "content",
|
||||
"query" : "(new york) AND ny"
|
||||
"query" : "field:new york AND city"
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
... will be splitted in `new york` and `ny` and each part is analyzed independently.
|
||||
... will be splitted in `new`, `york` and `city` and each part is analyzed independently.
|
||||
When multiple fields are provided it is also possible to modify how the different
|
||||
field queries are combined inside each textual part using the `type` parameter.
|
||||
The possible modes are described <<multi-match-types, here>> and the default is `best_fields`.
|
||||
|
|
Loading…
Reference in New Issue