Each document has an
_id that uniquely identifies it, which is indexed
so that documents can be looked up either with the GET API or the
ids query. The
_id can either be assigned at
indexing time, or a unique
_id can be generated by Elasticsearch. This field is not
configurable in the mappings.
The value of the
_id field is accessible in queries such as
Querying on the
_id field is restricted from use in aggregations, sorting, and scripting.
In case sorting or aggregating on the
_id field is required, it is advised to
duplicate the content of the
_id field into another field that has
_id is limited to 512 bytes in size and larger values will be rejected.