Closed
Description
When requesting fields
in the search, get, update, etc APIs, we should be able to control where those values come from with these prefixes:
_source
: extract the field value from the_source
field_fields
: retrieve astored
field value_doc
: retrieve the value from fielddata
The _doc
option is particularly useful for retrieving dates as, no matter the format they're specified in in the source, they will be accessible as milliseconds-since-the-epoch from fielddata, without the need to allow dynamic scripts.
While on the subject, perhaps we should support this same syntax in scripting, instead of docs['foo']
?