# Accessing \_timestamp value in ES 2.0

**URL:** <https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797>\
**Category:** Elasticsearch\
**Created:** [September 22, 2015, 4:48pm UTC](https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797 "2015-09-22T16:48:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisak/32/618_2.png) [@lisak](https://discuss.elastic.co/u/lisak)\
**Post date:** [September 22, 2015, 4:48pm UTC](https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797/1 "2015-09-22T16:48:53Z")

</div>

Hey,

the migration plugin gives me this warning :

> The \_timestamp field will only accept the enabled, format, and default parameters in future indices. Importantly, it will not be possible to extract the \_timestamp value from a path., in type: record.

I'm using this mapping :  
`"_timestamp": { "enabled": true, "store": true, "doc_values": true }`

To be able to access the \_timestamp value. Does it mean that in 2.0 the "store" feature won't be possible?

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [September 22, 2015, 9:13pm UTC](https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797/2 "2015-09-22T21:13:23Z")

</div>

This refers to a few things. They both stem from [this](https://github.com/elastic/elasticsearch/pull/11794), but to give a little color, I'll go in opposite order of what the warning is given 😁

First, the "it will not be possible to extract the \_timestamp value from a path" refers to the deprecation/discussion [here](https://github.com/elastic/elasticsearch/issues/9058). It's a fairly short and easy read, so you may want to have a look over that to see if there's anything that affects you.

Second, the "the \_timestamp field will only accept the enabled, format, and default parameters in future indices" relates to locking down bizarre (and sometimes ambiguous) mappings. On the contrary to it not being stored, the option to _not_ store it was removed, so any explicit `store` setting is warned against. That part comes from [this](https://github.com/elastic/elasticsearch/issues/8142). There are [a number of weird combinations which were removed](https://github.com/elastic/elasticsearch/issues/8870).

All of this said, you probably shouldn't be using the `_timestamp` if you can avoid it. Instead, you can use a regular [`date`](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/date.html) field, which allows you to use multiple dates/times in the same document, etc.

Does this help?

---

<div class="post-metadata">

**Author:** ![lisak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisak/32/618_2.png) [@lisak](https://discuss.elastic.co/u/lisak)\
**Post date:** [September 23, 2015, 3:31pm UTC](https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797/3 "2015-09-23T15:31:45Z")

</div>

Thank you Shane,

I actually don't use it anymore, now I'm only scanning indices with `_timestamp` based range.

So I'll change `_timestamp` mapping of future indices to :  
`"_timestamp": { "enabled": true, "doc_values": true }`

Anyway from what I understand I don't have to reindex anything...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:48pm UTC](https://discuss.elastic.co/t/accessing--timestamp-value-in-es-2-0/29797/4 "2017-07-05T23:48:29Z")

</div>


