[DOCS] Focus retrieving selected fields on fields parameter (#71506)

* [DOCS] Focus retrieving selected fields on fields parameter

* Incorporating changes from reviews

* Adding clarifications from review feedback

* Slight wording revisions.

* Clarify language around format parameter and move text out of callout.
This commit is contained in:
Adam Locke 2021-04-20 15:11:35 -04:00 committed by GitHub
parent bfb85bcecb
commit 6dfd92c46f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 253 additions and 252 deletions

View file

@ -441,15 +441,22 @@ GET /my-data-stream/_eql/search?filter_path=-hits.events._source
"event.type",
"process.*", <1>
{
"field": "@timestamp", <2>
"format": "epoch_millis"
"field": "@timestamp",
"format": "epoch_millis" <2>
}
]
}
----
// TEST[setup:sec_logs]
include::{es-repo-dir}/search/search-your-data/retrieve-selected-fields.asciidoc[tag=fields-param-callouts]
<1> Both full field names and wildcard patterns are accepted.
<2> Use the `format` parameter to apply a custom format for the field's values.
<<date,`date`>> and <<date_nanos, `date_nanos`>> fields accept a
<<mapping-date-format,date format>>. <<spatial_datatypes, Spatial fields>>
accept either `geojson` for http://www.geojson.org[GeoJSON] (the default)
or `wkt` for
{wikipedia}/Well-known_text_representation_of_geometry[Well Known Text].
Other field types do not support the `format` parameter.
The values are returned as a flat list in the `fields` section of each hit: