# Changing a mapping without deleting the index

**URL:** https://discuss.elastic.co/t/changing-a-mapping-without-deleting-the-index/9256
**Category:** Elasticsearch
**Created:** [October 5, 2012, 4:22pm UTC](https://discuss.elastic.co/t/changing-a-mapping-without-deleting-the-index/9256 "2012-10-05T16:22:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Amy](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Amy](https://discuss.elastic.co/u/Amy)
#### Post date: [October 5, 2012, 4:22pm UTC](https://discuss.elastic.co/t/changing-a-mapping-without-deleting-the-index/9256/1 "2012-10-05T16:22:39Z")

</div>

Hi,  
I changed a mapping template to add a "dynamic\_date\_formats" field, but  
after restarting elasticsearch and flushing the index the change wasn't  
picked up in my data.  
The data type was only changed after I deleted and re-added the index. How  
do I do this dynamically?

I added the template like this (the json is attached).  
curl -XPUT [http://localhost:9200/\_template/couchbase](http://localhost:9200/_template/couchbase) -d  
@plugins/transport-couchbase/couchbase\_template.json

--

---

<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:09am UTC](https://discuss.elastic.co/t/changing-a-mapping-without-deleting-the-index/9256/2 "2017-07-06T03:09:58Z")

</div>


