# Reindex data after changing default routing to a custom one

**URL:** <https://discuss.elastic.co/t/reindex-data-after-changing-default-routing-to-a-custom-one/46033>\
**Category:** Elasticsearch\
**Created:** [April 1, 2016, 7:59am UTC](https://discuss.elastic.co/t/reindex-data-after-changing-default-routing-to-a-custom-one/46033 "2016-04-01T07:59:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emanuel\_barac](https://avatars.discourse-cdn.com/v4/letter/e/b38774/32.png) [@emanuel\_barac](https://discuss.elastic.co/u/emanuel_barac)\
**Post date:** [April 1, 2016, 7:59am UTC](https://discuss.elastic.co/t/reindex-data-after-changing-default-routing-to-a-custom-one/46033/1 "2016-04-01T07:59:57Z")

</div>

Good morning,

How can I reindex all data from one index to a new one which has custom routing (documents are indexed to a specific shard based on a routing value). I need to specify somehow the routing parameter for each document. I am looking for a fast solution because the current index has 30 million documents. I used before for reindexing (i.e. after changing mapping) a python client which provide helpers to assist with bulk requests and reindexing of documents from one index to another. But as this indexes documents using bulk api, I can not use it in my situation.

Thanks!

---

<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, 11:03pm UTC](https://discuss.elastic.co/t/reindex-data-after-changing-default-routing-to-a-custom-one/46033/2 "2017-07-05T23:03:24Z")

</div>


