OpenSearch/docs/reference/query-dsl
Jim Ferenczi c3784326eb Refactor field expansion for match, multi_match and query_string query (#25726)
This commit changes the way we handle field expansion in `match`, `multi_match` and `query_string` query.
 The main changes are:

- For exact field name, the new behavior is to rewrite to a matchnodocs query when the field name is not found in the mapping.

- For partial field names (with `*` suffix), the expansion is done only on `keyword`, `text`, `date`, `ip` and `number` field types. Other field types are simply ignored.

- For all fields (`*`), the expansion is done on accepted field types only (see above) and metadata fields are also filtered.

- The `*` notation can also be used to set `default_field` option on`query_string` query. This should replace the needs for the extra option `use_all_fields` which is deprecated in this change.

This commit also rewrites simple `*` query to matchalldocs query when all fields are requested (Fixes #25556). 

The same change should be done on `simple_query_string` for completeness.

`use_all_fields` option in `query_string` is also deprecated in this change, `default_field` should be set to `*` instead.

Relates #25551
2017-07-21 16:52:57 +02:00
..
bool-query.asciidoc Rewrite description of `bool`'s `should` (#24342) 2017-04-26 14:09:26 -04:00
boosting-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
common-terms-query.asciidoc Upgrade to a Lucene 7 snapshot (#24089) 2017-04-18 15:17:21 +02:00
compound-queries.asciidoc Remove indices query (#21837) 2016-11-30 19:37:01 +01:00
constant-score-query.asciidoc Docs: Added link from bool and constant score query to filter context 2016-12-29 11:05:28 +01:00
dis-max-query.asciidoc Indentation error on example of dist_max (#22578) 2017-01-12 09:38:36 +01:00
exists-query.asciidoc Fix exists query doc 2017-03-30 22:26:10 -04:00
full-text-queries.asciidoc Update full-text-queries.asciidoc 2016-05-10 12:18:21 +02:00
function-score-query.asciidoc Require a field when a `seed` is provided to the `random_score` function. (#25594) 2017-07-19 14:11:15 +02:00
fuzzy-query.asciidoc Un-deprecate fuzzy query (#22088) 2016-12-12 12:09:16 +01:00
geo-bounding-box-query.asciidoc [Docs] Remove ignore_malformed from Geo Query DSL docs 2017-02-06 14:27:15 -06:00
geo-distance-query.asciidoc [Docs] Remove ignore_malformed from Geo Query DSL docs 2017-02-06 14:27:15 -06:00
geo-polygon-query.asciidoc [Docs] Remove ignore_malformed from Geo Query DSL docs 2017-02-06 14:27:15 -06:00
geo-queries.asciidoc Remove docs for the removed `geo_distance_range` query. 2016-11-30 16:36:55 +01:00
geo-shape-query.asciidoc CONSOLEify geo-shape docs 2017-03-31 09:11:54 -04:00
has-child-query.asciidoc Docs: Fix indentation in has-child-query.asciidoc (#23565) 2017-03-13 08:41:18 -07:00
has-parent-query.asciidoc Docs: Fix indentation in has-parent-query.asciidoc 2017-03-13 08:17:11 -07:00
ids-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
joining-queries.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
match-all-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
match-phrase-prefix-query.asciidoc Correct some spelling in match-phrase-prefix docs (#24956) 2017-05-30 09:02:01 -04:00
match-phrase-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
match-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
minimum-should-match.asciidoc Query DSL: Remove filter parsers. 2015-05-07 20:14:34 +02:00
mlt-query.asciidoc Remove deprecated query names: in, geo_bbox, mlt, fuzzy_match and match_fuzzy (#21852) 2016-11-29 19:07:01 +01:00
multi-match-query.asciidoc Add documentation for lenient in multimatch 2016-11-17 08:35:20 +01:00
multi-term-rewrite.asciidoc Expose Lucene's new TopTermsBlendedFreqScoringRewrite. 2015-07-08 16:01:47 +02:00
nested-query.asciidoc [TEST] wait for yellow after setup doc tests (#18726) 2016-06-03 16:37:28 +02:00
parent-id-query.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
percolate-query.asciidoc docs: Updated reference docs that `document_type` is deprecated 2017-07-14 11:07:46 +02:00
prefix-query.asciidoc Fail yaml tests and docs snippets that get unexpected warnings 2016-08-04 15:23:05 -04:00
query-string-query.asciidoc Refactor field expansion for match, multi_match and query_string query (#25726) 2017-07-21 16:52:57 +02:00
query-string-syntax.asciidoc Docs: Add a note about `<` and `>` in query_string 2017-01-31 12:23:18 -05:00
query_filter_context.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
range-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
regexp-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
regexp-syntax.asciidoc Update regexp-syntax.asciidoc (#20973) 2016-10-17 16:32:17 +02:00
script-query.asciidoc Scripting: Change keys for inline/stored scripts to source/id (#25127) 2017-06-09 08:29:25 -07:00
simple-query-string-query.asciidoc Document simple_query_string negation with default_operator of OR 2017-01-10 10:27:00 -07:00
span-containing-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-field-masking-query.asciidoc Documentation for field_masking_span query (#20395) 2016-09-13 12:27:33 +01:00
span-first-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-multi-term-query.asciidoc Update span-multi-term-query.asciidoc (#22733) 2017-01-23 17:33:40 +01:00
span-near-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-not-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-or-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-queries.asciidoc Documentation for field_masking_span query (#20395) 2016-09-13 12:27:33 +01:00
span-term-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
span-within-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
special-queries.asciidoc Removed deprecated template query. 2017-05-11 14:56:45 +02:00
term-level-queries.asciidoc Update term-level-queries.asciidoc 2016-08-03 10:18:13 -06:00
term-query.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
terms-query.asciidoc Make `index` in TermsLookup mandatory (#25753) 2017-07-17 18:50:30 +02:00
type-query.asciidoc Add back doc execution to query dsl. 2016-05-24 12:43:41 +02:00
wildcard-query.asciidoc Update wildcard-query.asciidoc (#20057) 2016-08-18 14:04:46 +02:00