# Need to create mapping for map with dotted fields

**URL:** <https://discuss.elastic.co/t/need-to-create-mapping-for-map-with-dotted-fields/93123>\
**Category:** Elasticsearch\
**Created:** [July 14, 2017, 6:33am UTC](https://discuss.elastic.co/t/need-to-create-mapping-for-map-with-dotted-fields/93123 "2017-07-14T06:33:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitish\_Goyal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nitish_goyal/32/54988_2.png) [@Nitish\_Goyal](https://discuss.elastic.co/u/Nitish_Goyal)\
**Post date:** [July 14, 2017, 6:33am UTC](https://discuss.elastic.co/t/need-to-create-mapping-for-map-with-dotted-fields/93123/1 "2017-07-14T06:33:41Z")

</div>

I have a map which have keys like "post" and "post.wall". I need to create a new index in 5.4 and then reindex docs from 1.4.

What kind of mapping shall I use to create an index so that my docs get reindexed without any error?

---

<div class="post-metadata">

**Author:** ![Surabhi\_Prasad](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Surabhi\_Prasad](https://discuss.elastic.co/u/Surabhi_Prasad)\
**Post date:** [July 14, 2017, 1:18pm UTC](https://discuss.elastic.co/t/need-to-create-mapping-for-map-with-dotted-fields/93123/2 "2017-07-14T13:18:31Z")

</div>

One way to achieve this would be to replace '.' with some other character at index time. either a de\_dot filter which is not recommended as it adds an overhead, or change the keys before indexing.

refer to this: [https://github.com/elastic/elasticsearch/issues/15951](https://github.com/elastic/elasticsearch/issues/15951)

---

<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 11, 2017, 1:18pm UTC](https://discuss.elastic.co/t/need-to-create-mapping-for-map-with-dotted-fields/93123/3 "2017-08-11T13:18:48Z")

</div>

Closed on August 11, 2017, 1:18pm UTC

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