0
votes

I want to create an index in elasticsearch 2.1 with a default date/time field. The documentation for 2.1 states that _timestamp is deprecated in 2.0 and to use the date type instead

So My question is what is the proper way to create an index with a default timestamp/date for all new records?

1

1 Answers

0
votes

The documentation clearly says to create a new date field and set its value explicitly when indexing a document. This is just like indexing any other field.

The _timestamp field is deprecated. Instead, use a normal date field and set its value explicitly.