# Reindexing multiple indexes into a single one

**URL:** <https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092>\
**Category:** Elasticsearch\
**Created:** [April 9, 2019, 7:22pm UTC](https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092 "2019-04-09T19:22:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheEvilDonut](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@TheEvilDonut](https://discuss.elastic.co/u/TheEvilDonut)\
**Post date:** [April 9, 2019, 7:22pm UTC](https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092/1 "2019-04-09T19:22:23Z")

</div>

I am currently trying to reduce the number of shards on the cluster by reindexing our indices. We are of course also reviewing the indices so we can adjust the templates so that the daily indices will be created with the number of shards they really need.

What am I trying to do is reindex more then one index into a single one :

POST \_reindex?&refresh  
{  
"source": {  
"index": ["index-a-2019.04.0\*", "index-b-2019.04.0\*"]  
},  
"dest": {  
"index": "new-index-2019.04-w1"  
}  
}

For some reason the process starts without a problem but will stop after a while before reindexing all of the documents.

Am I doing something wrong here?

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 9, 2019, 8:18pm UTC](https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092/2 "2019-04-09T20:18:20Z")

</div>

Hi @TheEvilDonut,

I am unable to spot the problem, as far as I can see this looks OK. Did you check the log files for any errors or warnings?

It might make sense to try to figure out if the error is triggered by a specific document, by trying to reindex one index at a time.

Also, the version of ES in use could be relevant.

---

<div class="post-metadata">

**Author:** ![TheEvilDonut](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@TheEvilDonut](https://discuss.elastic.co/u/TheEvilDonut)\
**Post date:** [April 10, 2019, 12:11pm UTC](https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092/3 "2019-04-10T12:11:27Z")

</div>

Thank you. At least that confirms that my syntax is correct. 🙂

---

<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:** [May 8, 2019, 12:11pm UTC](https://discuss.elastic.co/t/reindexing-multiple-indexes-into-a-single-one/176092/4 "2019-05-08T12:11:31Z")

</div>

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