# Enabling default timestamp in elasticsearch

**URL:** <https://discuss.elastic.co/t/enabling-default-timestamp-in-elasticsearch/22994>\
**Category:** Elasticsearch\
**Created:** [March 31, 2015, 2:57am UTC](https://discuss.elastic.co/t/enabling-default-timestamp-in-elasticsearch/22994 "2015-03-31T02:57:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Sharma](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Karthik\_Sharma](https://discuss.elastic.co/u/Karthik_Sharma)\
**Post date:** [March 31, 2015, 2:57am UTC](https://discuss.elastic.co/t/enabling-default-timestamp-in-elasticsearch/22994/1 "2015-03-31T02:57:45Z")

</div>

I want to organize my data in elasticsearch and visualize it using kibana.I  
am using elasticsearch 1.4.4 and Kibana3.

The elasticsearch for all my data is `bits` and I have two document types  
`aaaa` and `bbbb`. I run the below script at the beginning and expect a  
timestamp field of the format `yyyy-MM-dd HH:mm:ss` with value as the time  
of insertion of the document. I can't see this field in kibana. Kibana does  
say  
`mappings._default_._timestamp.enabled` however I can't seem to be able to  
set that as the `index` timestamp for my dashboard. What am I doing wrong  
here.

```
curl -XPOST localhost:9200/bits -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
            "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'
curl -XPOST localhost:9200/bits/aaaa -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
             "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'
curl -XPOST localhost:9200/bits/bbbb -d '{
"settings" : {
    "number_of_shards" : 2
},
"mappings" : {
    "_default_":{
        "_timestamp" : {
            "enabled" : true,
            "store" : true,
               "path" : "post_date",
            "format" : "yyyy-MM-dd HH:mm:ss"
        }
    }
  }
}'

```

--  
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/89e0b018-2569-462b-8b09-93da1d5e4010%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89e0b018-2569-462b-8b09-93da1d5e4010%40googlegroups.com).  
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, 12:22am UTC](https://discuss.elastic.co/t/enabling-default-timestamp-in-elasticsearch/22994/2 "2017-07-06T00:22:57Z")

</div>


