From 9332a9c74b08d11c8d550cba42b4c42a18cea3f7 Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Mon, 14 Sep 2020 13:43:30 -0700 Subject: [PATCH] Add the fields option to the search API docs. (#62260) --- docs/reference/search/search.asciidoc | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/reference/search/search.asciidoc b/docs/reference/search/search.asciidoc index 6940c972e97..c58da2794c1 100644 --- a/docs/reference/search/search.asciidoc +++ b/docs/reference/search/search.asciidoc @@ -332,6 +332,33 @@ pattern]. For other field data types, this parameter is not supported. ==== +`fields`:: +(Optional, array of strings and objects) +Array of wildcard (`*`) patterns. The request returns values for field names +matching these patterns in the `hits.fields` property of the response. ++ +You can specify items in the array as a string or object. +See <> for more details. ++ +.Properties of `fields` objects +[%collapsible%open] +==== +`field`:: +(Required, string) +Wildcard pattern. The request returns values for field names matching this pattern. + +`format`:: +(Optional, string) +Format in which the values are returned. ++ +The date fields <> and <> accept a +<>. <> accept either +`geojson` for http://www.geojson.org[GeoJSON] (the default) or `wkt` for +{wikipedia}/Well-known_text_representation_of_geometry[Well Known Text]. ++ +For other field data types, this parameter is not supported. +==== + [[request-body-search-explain]] `explain`:: (Optional, boolean) If `true`, returns detailed information about score @@ -358,7 +385,7 @@ are supported. `` is the factor by which scores are multiplied. + A boost value greater than `1.0` increases the score. A boost value between -`0` and `1.0` decreases the score. +`0` and `1.0` decreases the score. ==== [[search-api-min-score]]