# Change mapping without losing data

**URL:** https://discuss.elastic.co/t/change-mapping-without-losing-data/61222
**Category:** Elasticsearch
**Created:** [September 22, 2016, 9:06am UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222 "2016-09-22T09:06:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ivan\_Ghisleni](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Ivan\_Ghisleni](https://discuss.elastic.co/u/Ivan_Ghisleni)
#### Post date: [September 22, 2016, 9:06am UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222/1 "2016-09-22T09:06:36Z")

</div>

Hi,

Is it possible change mapping without losing the data?

thanx  
Ivan

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [September 22, 2016, 9:30am UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222/2 "2016-09-22T09:30:35Z")

</div>

You have to reindex. Have a look at the reindex API.

---

<div class="post-metadata">

### Author: ![Ivan\_Ghisleni](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Ivan\_Ghisleni](https://discuss.elastic.co/u/Ivan_Ghisleni)
#### Post date: [September 22, 2016, 10:12am UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222/3 "2016-09-22T10:12:16Z")

</div>

It's my first production project with elastic and maybe my questions could sounds stupid.

It is very interesting, but doesn't it introduce some overhead to the search instead of making the request to the original index?

Another question, how can I export data from my elastic server and load it to another elastic server?

Thanks

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [September 22, 2016, 10:38am UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222/4 "2016-09-22T10:38:07Z")

</div>

If you need to change the mapping, you must reindex. Reindex can mean reindex in place or in another index (which I prefer).  
No search overhead because it will be a fresh new index.

To copy from one server to another one, reindex API or snapshot and restore if you don't need to change the mapping

---

<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 5, 2017, 10:18pm UTC](https://discuss.elastic.co/t/change-mapping-without-losing-data/61222/5 "2017-07-05T22:18:10Z")

</div>


