Skip to content

Commit

Permalink
Small corrections to stored_fields docs. (elastic#53247)
Browse files Browse the repository at this point in the history
* Fix a reference to the 'field' option.
* Remove claim about detecting script fields.
* Specify that object fields will just be ignored.
  • Loading branch information
jtibshirani authored Mar 9, 2020
1 parent c091a66 commit c0c53b8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions docs/reference/search/request/stored-fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ If the requested fields are not stored (`store` mapping set to `false`), they wi

Stored field values fetched from the document itself are always returned as an array. On the contrary, metadata fields like `_routing` are never returned as an array.

Also only leaf fields can be returned via the `field` option. So object fields can't be returned and such requests
will fail.

Script fields can also be automatically detected and used as fields, so
things like `_source.obj1.field1` can be used, though not recommended, as
`obj1.field1` will work as well.
Also only leaf fields can be returned via the `stored_fields` option. If an object field is specified, it will be ignored.

NOTE: On its own, `stored_fields` cannot be used to load fields in nested
objects -- if a field contains a nested object in its path, then no data will
Expand Down

0 comments on commit c0c53b8

Please sign in to comment.