# How to edit mappings

**URL:** <https://discuss.elastic.co/t/how-to-edit-mappings/142647>\
**Category:** Elasticsearch\
**Created:** [August 1, 2018, 8:26pm UTC](https://discuss.elastic.co/t/how-to-edit-mappings/142647 "2018-08-01T20:26:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etienne\_Poulin](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@Etienne\_Poulin](https://discuss.elastic.co/u/Etienne_Poulin)\
**Post date:** [August 1, 2018, 8:26pm UTC](https://discuss.elastic.co/t/how-to-edit-mappings/142647/1 "2018-08-01T20:26:57Z")

</div>

Hi. I'm very to elasticsearch, so please excuse my lack of knowledge. I normally insert stuff inside indices using the java api, and read them by parsing the JSON aquired by querying to `http://localhost:9200/portail/_search?pretty=true&sort=date` for example. I've realised the sort option wasn't working, probably due to my date format. I heard you could edit the format / add a new one in the mappings. How do I edit that ? I know you can view them by querying \_mappings via URL, but how can I edit them ? Is that in the config file or something ? Thanks

---

<div class="post-metadata">

**Author:** ![r4-keisuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/r4-keisuke/32/9268_2.png) [@r4-keisuke](https://discuss.elastic.co/u/r4-keisuke)\
**Post date:** [August 1, 2018, 11:08pm UTC](https://discuss.elastic.co/t/how-to-edit-mappings/142647/2 "2018-08-01T23:08:10Z")

</div>

Hi.

How about this page?  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#\_example\_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#_example_mapping)

I think It's useful to you.

And cannot change mapping stocked data already. (It's possible make new field via scheme-less)  
It's better make another index with new mappings I think.

Good luck!

---

<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:** [August 29, 2018, 11:08pm UTC](https://discuss.elastic.co/t/how-to-edit-mappings/142647/3 "2018-08-29T23:08:12Z")

</div>

Closed on August 29, 2018, 11:08pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
