# How to Increase number of shards of an existing Index

**URL:** <https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886>\
**Category:** Elasticsearch\
**Created:** [June 3, 2019, 6:23am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886 "2019-06-03T06:23:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shivendra\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_singh/32/45859_2.png) [@Shivendra\_Singh](https://discuss.elastic.co/u/Shivendra_Singh)\
**Post date:** [June 3, 2019, 6:23am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/1 "2019-06-03T06:23:27Z")

</div>

Hi All,

I am new to ES stack. I have a question related to reindexing-

I have created an index with default option(5 shards and 1 replica). Can I increase number of shards for my index if data size of my index increases in future? Or I need to re-index the index with updated number of shards.  
We have read in the documentation that its always better to create index with required number of shard but I our case we are not able to calculate data size as it is still growing.

Thanks,  
Shiveendra

---

<div class="post-metadata">

**Author:** ![elk11](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@elk11](https://discuss.elastic.co/u/elk11)\
**Post date:** [June 3, 2019, 7:05am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/2 "2019-06-03T07:05:22Z")

</div>

> Can I increase number of shards for my index if data size of my index increases in future?

The practice is to create a new index and start indexing data into the new index.

Time based indices are a good example. Check out the elasticsearch documentation for time based indices.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 3, 2019, 7:10am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/3 "2019-06-03T07:10:22Z")

</div>

What is your use case? Which version are you using?

---

<div class="post-metadata">

**Author:** ![Shivendra\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_singh/32/45859_2.png) [@Shivendra\_Singh](https://discuss.elastic.co/u/Shivendra_Singh)\
**Post date:** [June 3, 2019, 7:49am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/4 "2019-06-03T07:49:49Z")

</div>

thanks for the reply. We want to keep reporting data. This data is timestamp driven, it will grow with time. If I will keep data in one index then may be I have to increase number of shards of that index.

---

<div class="post-metadata">

**Author:** ![Shivendra\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_singh/32/45859_2.png) [@Shivendra\_Singh](https://discuss.elastic.co/u/Shivendra_Singh)\
**Post date:** [June 3, 2019, 7:51am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/5 "2019-06-03T07:51:22Z")

</div>

Thanks for the reply. It seems this will solve my problem. I just need to check how to use composite query in this case. As index will be created on daily basis.

---

<div class="post-metadata">

**Author:** ![Shivendra\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivendra_singh/32/45859_2.png) [@Shivendra\_Singh](https://discuss.elastic.co/u/Shivendra_Singh)\
**Post date:** [June 4, 2019, 6:10am UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/6 "2019-06-04T06:10:59Z")

</div>

Thanks for the help. please close this topic.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 4, 2019, 10:19pm UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/7 "2019-06-04T22:19:35Z")

</div>

You shouldn't be using a single index for this type of data.

The best option is to use ILM - [https://www.elastic.co/guide/en/elasticsearch///reference/current/index-lifecycle-management.html](https://www.elastic.co/guide/en/elasticsearch///reference/current/index-lifecycle-management.html) - or alternatively, time based indices.

---

<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 2, 2019, 10:19pm UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-of-an-existing-index/183886/8 "2019-07-02T22:19:35Z")

</div>

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