# Default mapping for index

**URL:** <https://discuss.elastic.co/t/default-mapping-for-index/31778>\
**Category:** Elasticsearch\
**Created:** [October 7, 2015, 2:22pm UTC](https://discuss.elastic.co/t/default-mapping-for-index/31778 "2015-10-07T14:22:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehmet\_Ozer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehmet_ozer/32/81567_2.png) [@Mehmet\_Ozer](https://discuss.elastic.co/u/Mehmet_Ozer)\
**Post date:** [October 7, 2015, 2:22pm UTC](https://discuss.elastic.co/t/default-mapping-for-index/31778/1 "2015-10-07T14:22:06Z")

</div>

Dear all,

I am trying to index a json document which contains date fields but since I had no mapping defined before for the index, all date fields are "string". How can I define a mapping from the zero so that I will have my date fields as date and the others will stay string ?

Thank you

---

<div class="post-metadata">

**Author:** ![mgrigorov](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mgrigorov](https://discuss.elastic.co/u/mgrigorov)\
**Post date:** [October 7, 2015, 8:34pm UTC](https://discuss.elastic.co/t/default-mapping-for-index/31778/2 "2015-10-07T20:34:44Z")

</div>

Hi,

## Please consult with the documentation:

## [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html)

[https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html)

---

<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:46pm UTC](https://discuss.elastic.co/t/default-mapping-for-index/31778/3 "2017-07-05T23:46:03Z")

</div>


