Some meta fields can be defined in the mapping to customize the indexing operation. We'll list some of the important ones and describe their usage:
- _meta: This is for user-defined metadata. Developers can use it to store the application-specific metadata.
- _routing: You can configure the routing value in the mapping to require all subsequent related operations to have the routing value specified.
- _source: By default, _source is enabled and the source document is stored. If the _source is disabled by a user, then the source document is not retained. The benefit to this is that it saves some storage space. The drawback is that there are no more supports for the document to reindex, update, and highlight when executing a search. Think carefully before deciding.
_meta and _routing can be updated, but _source cannot be updated. Let us use the following...