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

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?

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.

On Wed, May 16, 2012 at 7:04 PM, Jaap Taal 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?