# How can I set new shard and replica number with re-index?

**URL:** https://discuss.elastic.co/t/how-can-i-set-new-shard-and-replica-number-with-re-index/271337
**Category:** Elasticsearch
**Created:** [April 27, 2021, 8:45am UTC](https://discuss.elastic.co/t/how-can-i-set-new-shard-and-replica-number-with-re-index/271337 "2021-04-27T08:45:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RusseL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russel/32/77328_2.png) [@RusseL](https://discuss.elastic.co/u/RusseL)
#### Post date: [April 27, 2021, 8:45am UTC](https://discuss.elastic.co/t/how-can-i-set-new-shard-and-replica-number-with-re-index/271337/1 "2021-04-27T08:45:07Z")

</div>

I have an index consisting of 40 shards and I want to make 50 shards with reindex. How can I determine the new shard and replica number with the reindex?

---

<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: [April 27, 2021, 1:53pm UTC](https://discuss.elastic.co/t/how-can-i-set-new-shard-and-replica-number-with-re-index/271337/2 "2021-04-27T13:53:51Z")

</div>

You can just create the target index with the 50 shards and then call the reindex API.

---

<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 25, 2021, 1:54pm UTC](https://discuss.elastic.co/t/how-can-i-set-new-shard-and-replica-number-with-re-index/271337/3 "2021-05-25T13:54:15Z")

</div>

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