# Creating index with \_timestamps

**URL:** https://discuss.elastic.co/t/creating-index-with--timestamps/18760
**Category:** Elasticsearch
**Created:** [July 21, 2014, 10:44am UTC](https://discuss.elastic.co/t/creating-index-with--timestamps/18760 "2014-07-21T10:44:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Surajit\_Roy](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Surajit\_Roy](https://discuss.elastic.co/u/Surajit_Roy)
#### Post date: [July 21, 2014, 10:44am UTC](https://discuss.elastic.co/t/creating-index-with--timestamps/18760/1 "2014-07-21T10:44:03Z")

</div>

Hi All,

I am trying to create an index with a \_timestamp mapping.

curl -XPOST "[http://localhost:9200/test](http://localhost:9200/test)" -d'  
{ "settings" :  
{ "number\_of\_shards" : 5,  
"number\_of\_replicas" : 1},  
"mappings" : {  
"stats" : {  
"\_timestamp" : {  
"enabled" : true,  
"store" : true }  
}}}'

When I am writing the data in the index I dont see the time stamp coming up

curl -XPOST "[http://localhost:9200/test/stats/1](http://localhost:9200/test/stats/1)" -d'{"a":1}'

{"\_index":"test","\_type":"stats","\_id":"1","\_version":1,"created":true}

Why am I not getting \_timestamp, can anyone help?

Thanks  
Surajit

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAxzCObuchG-a-tBfDQa-u3\_ahX7hoaPq8g3jgVZXMBiEJH4oA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAxzCObuchG-a-tBfDQa-u3_ahX7hoaPq8g3jgVZXMBiEJH4oA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 21, 2014, 1:27pm UTC](https://discuss.elastic.co/t/creating-index-with--timestamps/18760/2 "2014-07-21T13:27:42Z")

</div>

Ask for it using fields: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html#search-request-fields](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html#search-request-fields)

Using timestamp does not modify the original source.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 21 juil. 2014 à 12:44, Surajit Roy [beasurajitroy@gmail.com](mailto:beasurajitroy@gmail.com) a écrit :

Hi All,

I am trying to create an index with a \_timestamp mapping.

curl -XPOST "[http://localhost:9200/test](http://localhost:9200/test)" -d'  
{ "settings" :  
{ "number\_of\_shards" : 5,  
"number\_of\_replicas" : 1},  
"mappings" : {  
"stats" : {  
"\_timestamp" : {  
"enabled" : true,  
"store" : true }  
}}}'

When I am writing the data in the index I dont see the time stamp coming up

curl -XPOST "[http://localhost:9200/test/stats/1](http://localhost:9200/test/stats/1)" -d'{"a":1}'

{"\_index":"test","\_type":"stats","\_id":"1","\_version":1,"created":true}

Why am I not getting \_timestamp, can anyone help?

## Thanks Surajit

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAAxzCObuchG-a-tBfDQa-u3\_ahX7hoaPq8g3jgVZXMBiEJH4oA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAxzCObuchG-a-tBfDQa-u3_ahX7hoaPq8g3jgVZXMBiEJH4oA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/873351B2-4C21-406A-B606-D9E8EE4A410D%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/873351B2-4C21-406A-B606-D9E8EE4A410D%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:14am UTC](https://discuss.elastic.co/t/creating-index-with--timestamps/18760/3 "2017-07-06T01:14:32Z")

</div>


