# Restarting ElasticSearch with dynamic templates in config file, how does it work?

**URL:** <https://discuss.elastic.co/t/restarting-elasticsearch-with-dynamic-templates-in-config-file-how-does-it-work/7722>\
**Category:** Elasticsearch\
**Created:** [May 16, 2012, 4:04pm UTC](https://discuss.elastic.co/t/restarting-elasticsearch-with-dynamic-templates-in-config-file-how-does-it-work/7722 "2012-05-16T16:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)\
**Post date:** [May 16, 2012, 4:04pm UTC](https://discuss.elastic.co/t/restarting-elasticsearch-with-dynamic-templates-in-config-file-how-does-it-work/7722/1 "2012-05-16T16:04:04Z")

</div>

We're running into issues when we restart ElasticSearch.  
We're using a default-mapping.json file with dynamic\_templates.

The first time the server is restarted, we see that the  
dynamic\_templates are "doubled", the second time we restart the server  
we see the templated trippeled etc.

How do we prevent this when we're using a default-mapping.json file?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 17, 2012, 10:10pm UTC](https://discuss.elastic.co/t/restarting-elasticsearch-with-dynamic-templates-in-config-file-how-does-it-work/7722/2 "2012-05-17T22:10:46Z")

</div>

Heya, yea, its a bug, opened an issue:  
[Mapping: default mapping with dynamic templates can cause them to double on each restart · Issue #1964 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1964).

On Wed, May 16, 2012 at 7:04 PM, Jaap Taal [jaap@q42.nl](mailto:jaap@q42.nl) wrote:

> We're running into issues when we restart Elasticsearch.  
> We're using a default-mapping.json file with dynamic\_templates.
> 
> The first time the server is restarted, we see that the  
> dynamic\_templates are "doubled", the second time we restart the server  
> we see the templated trippeled etc.
> 
> How do we prevent this when we're using a default-mapping.json file?

---

<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 6, 2017, 3:28am UTC](https://discuss.elastic.co/t/restarting-elasticsearch-with-dynamic-templates-in-config-file-how-does-it-work/7722/3 "2017-07-06T03:28:19Z")

</div>

Closed on July 6, 2017, 3:28am UTC


