# Update mapping

**URL:** https://discuss.elastic.co/t/update-mapping/20302
**Category:** Elasticsearch
**Created:** [October 17, 2014, 7:54am UTC](https://discuss.elastic.co/t/update-mapping/20302 "2014-10-17T07:54:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eunever32](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@eunever32](https://discuss.elastic.co/u/eunever32)
#### Post date: [October 17, 2014, 7:54am UTC](https://discuss.elastic.co/t/update-mapping/20302/1 "2014-10-17T07:54:42Z")

</div>

Is the way to update mapping of large index as follows

Create empty index with new mapping  
Copy old data into new index  
Alias new index to previous

If so, what are recommended tools?

Ideally there would be a user interface for IT people to use?

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [October 19, 2014, 9:24pm UTC](https://discuss.elastic.co/t/update-mapping/20302/2 "2014-10-19T21:24:33Z")

</div>

Yes it is. There are unfortunately no APIs yet to reindex content from an  
index to a new index. There is an issue open for that[1] which is currently  
blocked by the fact that we need a better infrastructure to handle  
long-running tasks in a cluster.

However, it is still possible to reindex externally by using the  
scan/scroll and bulk-update APIs. Some our our client libraries even  
provide easy-to-use helper methods to do so. For instance see the  
elasticsearch.helpers.reindex[2] helper from our python client.

[1] [Reindex from \_source by document ID or Query · Issue #492 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/492)  
[2]  
[Helpers — Python Elasticsearch client 8.11.0 documentation](http://elasticsearch-py.readthedocs.org/en/latest/helpers.html#elasticsearch.helpers.reindex)

On Fri, Oct 17, 2014 at 9:54 AM, [eunever32@gmail.com](mailto:eunever32@gmail.com) wrote:

> Is the way to update mapping of large index as follows
> 
> Create empty index with new mapping  
> Copy old data into new index  
> Alias new index to previous
> 
> If so, what are recommended tools?
> 
> Ideally there would be a user interface for IT people to use?
> 
> Thanks
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [October 19, 2014, 10:19pm UTC](https://discuss.elastic.co/t/update-mapping/20302/3 "2014-10-19T22:19:05Z")

</div>

Scan\scroll is indeed the way to go. The only thing I can add is that you  
should take the opportunity to run sanity checks on the documents like  
filtering out fields that were in the old index but shouldn't be copied to  
the new one.  
On Oct 19, 2014 5:24 PM, "Adrien Grand" [adrien.grand@elasticsearch.com](mailto:adrien.grand@elasticsearch.com)  
wrote:

> Yes it is. There are unfortunately no APIs yet to reindex content from an  
> index to a new index. There is an issue open for that[1] which is currently  
> blocked by the fact that we need a better infrastructure to handle  
> long-running tasks in a cluster.
> 
> However, it is still possible to reindex externally by using the  
> scan/scroll and bulk-update APIs. Some our our client libraries even  
> provide easy-to-use helper methods to do so. For instance see the  
> elasticsearch.helpers.reindex[2] helper from our python client.
> 
> [1] [Reindex from \_source by document ID or Query · Issue #492 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/492)  
> [2]  
> [Helpers — Python Elasticsearch client 8.11.0 documentation](http://elasticsearch-py.readthedocs.org/en/latest/helpers.html#elasticsearch.helpers.reindex)
> 
> On Fri, Oct 17, 2014 at 9:54 AM, [eunever32@gmail.com](mailto:eunever32@gmail.com) wrote:
> 
> > Is the way to update mapping of large index as follows
> > 
> > Create empty index with new mapping  
> > Copy old data into new index  
> > Alias new index to previous
> > 
> > If so, what are recommended tools?
> > 
> > Ideally there would be a user interface for IT people to use?
> > 
> > Thanks
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1691b5c9-3aa5-4d8b-9149-e2b2dff56817%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien Grand
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4tTpMX9gQCG7j1cNXwi4b-udsF0SUrQXMduf3OU3uhTA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0c\_RWFGjnhNKC4k1%2Bwap8FLEYd0k9D0J4cyeXKRFZBTw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0c_RWFGjnhNKC4k1%2Bwap8FLEYd0k9D0J4cyeXKRFZBTw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:55am UTC](https://discuss.elastic.co/t/update-mapping/20302/4 "2017-07-06T00:55:12Z")

</div>


