# How partially update mapping

**URL:** <https://discuss.elastic.co/t/how-partially-update-mapping/162037>\
**Category:** Elasticsearch\
**Created:** [December 24, 2018, 11:52pm UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037 "2018-12-24T23:52:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![begemoth](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@begemoth](https://discuss.elastic.co/u/begemoth)\
**Post date:** [December 24, 2018, 11:52pm UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037/1 "2018-12-24T23:52:48Z")

</div>

I need to include new dynamic template for different languages base on document language definition. I don't want to upload all mapping ( dynamic templates) for all supported languages at the beginning. Instead I want to add new mapping to already existing on demand. It is possible add a new template to already defined ones in existing mapping?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 28, 2018, 5:46am UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037/2 "2018-12-28T05:46:05Z")

</div>

You can add the template, however it will only be applied to new documents in the index.

Why don't you use different indices?

---

<div class="post-metadata">

**Author:** ![begemoth](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@begemoth](https://discuss.elastic.co/u/begemoth)\
**Post date:** [December 28, 2018, 11:15am UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037/3 "2018-12-28T11:15:02Z")

</div>

If it is possible to add new templates please explain how to do it?  
It is ok that new template will be applied only to new documents

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 28, 2018, 8:25pm UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037/4 "2018-12-28T20:25:09Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html) should get you started.

---

<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:** [January 25, 2019, 8:25pm UTC](https://discuss.elastic.co/t/how-partially-update-mapping/162037/5 "2019-01-25T20:25:10Z")

</div>

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