# How to enable \_timestamp by default for all the documents?

**URL:** <https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373>\
**Category:** Elasticsearch\
**Created:** [March 3, 2016, 11:30am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373 "2016-03-03T11:30:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 3, 2016, 11:30am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/1 "2016-03-03T11:30:20Z")

</div>

Hi Esperts,

I want to enable \_timestamp for all the documents in ES 1.7.1, I mean when I index the data timestamp should enable with the document.  
For now this is what I tried.

POST /clust  
{  
"mappings" : {  
"_default_":{  
"\_timestamp" : {  
"enabled" : true,  
"store" : true  
}  
}  
}  
}

Now when I am feeding data to ES and check it in Kibana I do not see timestamp field in the drop down .I can only see document time

![](https://us1.discourse-cdn.com/elastic/original/2X/4/42c5e6a06cb3f60d63aa066cd4b0d26984a705cd.png)

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [March 3, 2016, 11:40am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/2 "2016-03-03T11:40:02Z")

</div>

The issue is in Kibana. You can try the following steps:  
Go to Settings/Advanced.  
Edit the metaFields and add "\_timestamp". Hit save.

Though please note that \_timestamp is deprecated in ES \> 2.0:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-timestamp-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-timestamp-field.html)

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 3, 2016, 11:44am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/3 "2016-03-03T11:44:11Z")

</div>

Thanks Jim,

Ok with above steps I am able to see \_timestamp in kibana Drop Down but after selecting it I got nothing in Discover , any idea why is it so ?

Thanks  
VG

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [March 3, 2016, 11:50am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/4 "2016-03-03T11:50:02Z")

</div>

Did you reindex your data after you enabled the timestamp ?

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 3, 2016, 11:52am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/5 "2016-03-03T11:52:20Z")

</div>

Oh yes I always follow this , so I delete my index and then enable timestamp, then I re index my data .

My data is as follows (I am directly feeding it via ES )

Name,rollno,marks,time  
vg,12,50,12321231(EPOCH time)

---

<div class="post-metadata">

**Author:** ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)\
**Post date:** [March 3, 2016, 11:54am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/6 "2016-03-03T11:54:19Z")

</div>

No idea then. Did you try to use the field in a dashboard ?

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 3, 2016, 11:58am UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/7 "2016-03-03T11:58:08Z")

</div>

ok, if not timestamp can you please guide how I can show this EPOCH date(1457005581) in date time format . For now this is what I done

PUT /clust  
{  
"mappings" : {  
"_default_" : {  
"\_all" : {"enabled" : false},  
"properties" : {   
"time": {"type": "date"}   
}  
}  
}  
}

But again the challenge is I do not see any document in Kibana . It seems ES is not converting my Document epoch to default date and time format.

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 3, 2016, 12:18pm UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/8 "2016-03-03T12:18:41Z")

</div>

I guess I have to open a separate thread for this .

---

<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:11pm UTC](https://discuss.elastic.co/t/how-to-enable--timestamp-by-default-for-all-the-documents/43373/9 "2017-07-05T23:11:39Z")

</div>


