# Reindexing many indices

**URL:** <https://discuss.elastic.co/t/reindexing-many-indices/169952>\
**Category:** Elasticsearch\
**Created:** [February 26, 2019, 8:17am UTC](https://discuss.elastic.co/t/reindexing-many-indices/169952 "2019-02-26T08:17:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [February 26, 2019, 8:17am UTC](https://discuss.elastic.co/t/reindexing-many-indices/169952/1 "2019-02-26T08:17:03Z")

</div>

Currently I am working to reindex daily indices for 4 months to new indices. I want to know if there is some way to carry this out so that if any error occurs while reindexing a document, I can continue from that point again instead of starting the whole process again.

---

<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:** [February 26, 2019, 1:36pm UTC](https://discuss.elastic.co/t/reindexing-many-indices/169952/2 "2019-02-26T13:36:50Z")

</div>

The best way is to split the process up along some natural boundaries. If you hit an error you can restart the part that hit the error. If the documents don't change it should be safe to just recopy the parts you've copied. It sounds like you are already splitting the process per index. It might also be useful to split it per hour in the day based on a time field. That way you have fewer to redo if there is a problem and each chunk will finish a little faster. You can add a range query to reindex to do that.

---

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [February 26, 2019, 2:44pm UTC](https://discuss.elastic.co/t/reindexing-many-indices/169952/3 "2019-02-26T14:44:53Z")

</div>

Thanks for the response. Just to confirm, splitting reindexing on hourly basis would need a for loop in place. Is there any other way to parallelize this?

---

<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:** [March 26, 2019, 2:44pm UTC](https://discuss.elastic.co/t/reindexing-many-indices/169952/4 "2019-03-26T14:44:54Z")

</div>

Closed on March 26, 2019, 2:44pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
