# Customize default mapping of elasticsearch

**URL:** <https://discuss.elastic.co/t/customize-default-mapping-of-elasticsearch/151615>\
**Category:** Elasticsearch\
**Created:** [October 9, 2018, 11:11am UTC](https://discuss.elastic.co/t/customize-default-mapping-of-elasticsearch/151615 "2018-10-09T11:11:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranav24](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@pranav24](https://discuss.elastic.co/u/pranav24)\
**Post date:** [October 9, 2018, 11:11am UTC](https://discuss.elastic.co/t/customize-default-mapping-of-elasticsearch/151615/1 "2018-10-09T11:11:39Z")

</div>

Hi everyone,

I want to change default mapping provided by elasticsearch for a index.

When I am creating any index, I am providing mapping for known fields which I know will come inside that index. But there are some extra fields which can be indexed at run time, I want to set mapping for them whenever they are added.  
Elasticsearch version -6.3.2

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [October 10, 2018, 12:48pm UTC](https://discuss.elastic.co/t/customize-default-mapping-of-elasticsearch/151615/2 "2018-10-10T12:48:47Z")

</div>

Take a look at [dynamic templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html). Dynamic templates allow you to change the default mapping of unmapped fields, based on the name or JSON type of that field.

---

<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:** [November 7, 2018, 12:48pm UTC](https://discuss.elastic.co/t/customize-default-mapping-of-elasticsearch/151615/3 "2018-11-07T12:48:48Z")

</div>

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