elasticsearch/docs/reference/search
Alan Woodward 8bc46ad959
Add filtering to fieldcaps endpoint (#83636)
Many consumers of the field caps API need to do some post-processing of the
results before they can use them; for instance, Kibana would like to exclude
multifields from certain field selections, or would like to display only geo_point
fields in Maps. ML and QL consumers exclude nested fields in certain
circumstances. This post-processing is possible at the moment, but can be
hacky; and in all cases it involves sending the whole (possibly very large) field
caps response over the wire and then whittling it down in the client. It is also not
guaranteed to be accurate - runtime fields may be incorrectly classified as multifields,
for example.

This commit pushes filtering into elasticsearch itself, reducing the amount of data
that needs to be transported and ensuring better accuracy. The field caps API gets
two new parameters:

* filters - a comma-delimited list that may contain any combination of: `+metadata`,
  `-metadata`, `-nested`, `-parent`, `-multifield`
* types - a comma-delimited list of field types; only fields that have a type in this set
  will be returned

The API will make best-effort attempts to apply the filters post-hoc to responses from
older nodes, so this should still work in a mixed-cluster or cross-cluster situation.

Fixes #82966, #72174
2022-02-10 14:06:26 +00:00
..
search-your-data [DOCS] Synced with 8.0 stack upgrade changes (#83489) (#83596) 2022-02-07 11:01:42 -05:00
suggesters [DOCS] Overhaul search template docs (#72583) 2021-06-30 16:03:49 -04:00
async-search.asciidoc [DOCS] Remove testenv annotations from doc snippet tests (#80023) 2021-11-05 18:38:50 -04:00
clear-scroll-api.asciidoc [DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
count.asciidoc [DOCS] Add info about GET/POST to the API conventions. (#74529) 2021-06-30 09:24:42 -07:00
explain.asciidoc [DOCS] Consolidate routing parameter definitions (#73107) 2021-05-14 12:27:19 -04:00
field-caps.asciidoc Add filtering to fieldcaps endpoint (#83636) 2022-02-10 14:06:26 +00:00
knn-search.asciidoc [DOCS] Add high-level guide for kNN search (#80857) 2021-11-30 14:17:39 -05:00
multi-search-template-api.asciidoc [DOCS] Update remote cluster docs (#77043) 2021-09-22 16:02:33 -04:00
multi-search.asciidoc [DOCS] Update remote cluster docs (#77043) 2021-09-22 16:02:33 -04:00
point-in-time-api.asciidoc Handle partial search result with point in time (#81349) 2021-12-08 10:04:38 -05:00
profile.asciidoc Update JSON parser and snippets (#77983) 2021-09-20 11:08:26 +01:00
rank-eval.asciidoc [DOCS] Overhaul search template docs (#72583) 2021-06-30 16:03:49 -04:00
render-search-template-api.asciidoc [DOCS] Overhaul search template docs (#72583) 2021-06-30 16:03:49 -04:00
scroll-api.asciidoc [DOCS] Update alias references (#73427) 2021-05-27 16:00:57 -04:00
search-shards.asciidoc [DOCS] Update alias references (#73427) 2021-05-27 16:00:57 -04:00
search-template-api.asciidoc [DOCS] Update remote cluster docs (#77043) 2021-09-22 16:02:33 -04:00
search-vector-tile-api.asciidoc Add docs for kNN search endpoint (#80378) 2021-11-09 09:28:12 -08:00
search.asciidoc Remove experimental flag from geo field format mvt (#81721) 2021-12-14 15:21:05 +01:00
suggesters.asciidoc [DOCS] Fix minor suggester doc errors (#68244) 2021-02-01 09:33:12 -05:00
terms-enum.asciidoc [Docs] Add supported _terms_enum field types (#83244) 2022-01-28 12:47:12 +01:00
validate.asciidoc [DOCS] Update alias references (#73427) 2021-05-27 16:00:57 -04:00