# How to increase shard count for existing indices

**URL:** <https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172>\
**Category:** Elasticsearch\
**Created:** [October 11, 2019, 7:31am UTC](https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172 "2019-10-11T07:31:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anikesh\_Paul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anikesh_paul/32/54900_2.png) [@Anikesh\_Paul](https://discuss.elastic.co/u/Anikesh_Paul)\
**Post date:** [October 11, 2019, 7:31am UTC](https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172/1 "2019-10-11T07:31:09Z")

</div>

Hi,

I want to increase the shard count of my indices. Is that possible to do that?

I researched and found there is a possibilities to achieve the same using template, but as per my understanding we can do that only for newly create indices if we use template.

So I want something which can be used to change the shard count of existing indices without creating new indices.

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 11, 2019, 7:54am UTC](https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172/2 "2019-10-11T07:54:51Z")

</div>

> [@Anikesh\_Paul](#):
>
> So I want something which can be used to change the shard count of existing indices without creating new indices.

You can use the [Split index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html) which allows you to increase the number of primary shards in an existing index. But it requires you to set the index to read-only before the split operation and you can only increase the number of shards with certain factors.

I personally prefer to use the [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) as I can then specify the exact number of shards I want in the new index. Plus I don't have to set the old index to read-only while I perform the reindexing. Afterward I simply switch the alias and synch up the changes with a final reindex call before deleting the old index.

Good luck!

---

<div class="post-metadata">

**Author:** ![Anikesh\_Paul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anikesh_paul/32/54900_2.png) [@Anikesh\_Paul](https://discuss.elastic.co/u/Anikesh_Paul)\
**Post date:** [October 11, 2019, 9:58am UTC](https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172/3 "2019-10-11T09:58:37Z")

</div>

Yeah I also think it's better to use Reindex API, thinking of using that only. Anyways thanks for the suggestion. 👍 🙂

---

<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:** [November 8, 2019, 9:58am UTC](https://discuss.elastic.co/t/how-to-increase-shard-count-for-existing-indices/203172/4 "2019-11-08T09:58:43Z")

</div>

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