WARNING: Version 1.3 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
_source
edit_source
editThe _source
field is an automatically generated field that stores the
actual JSON that was used as the indexed document. It is not indexed
(searchable), just stored. When executing "fetch" requests, like
get or
search, the _source
field is
returned by default.
Though very handy to have around, the source field does incur storage overhead within the index. For this reason, it can be disabled. For example:
{ "tweet" : { "_source" : {"enabled" : false} } }
Includes / Excludes
editAllow to specify paths in the source that would be included / excluded
when it’s stored, supporting *
as wildcard annotation. For example:
{ "my_type" : { "_source" : { "includes" : ["path1.*", "path2.*"], "excludes" : ["path3.*"] } } }