How to add automatic creation date in Elasticsearch

Before version 2.0, you must create the _timestamp field in your type: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-timestamp-field.html

Unfortunately, this is out of date. A new replacement for this is the "date" field, but this must be filled out explicitly.

Is there a way to automatically create a creation date?

+4
source share
1 answer

According to the _timestamp documentation, the _timestamp changes are _timestamp outdated, and there is no special replacement for it:

Instead of the _timestamp field, use a regular date field and set the value explicitly.

This means that the client must set the time for creating documents.

+5

All Articles