# Increase the number of shrads

**URL:** <https://discuss.elastic.co/t/increase-the-number-of-shrads/141425>\
**Category:** Elasticsearch\
**Created:** [July 24, 2018, 4:25pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425 "2018-07-24T16:25:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [July 24, 2018, 4:25pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/1 "2018-07-24T16:25:03Z")

</div>

How to increase the the number of shrads of elasticsearch index

---

<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:** [July 24, 2018, 4:47pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/2 "2018-07-24T16:47:11Z")

</div>

For a new index?

```auto
PUT /my_temp_index
{
    "settings": {
        "number_of_shards" : 10
    }
}

```

For an existing index, it might be possible to call: [https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html)

Otherwise you need to reindex. Use the Reindex API for that: [https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html)

---

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [July 24, 2018, 5:06pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/3 "2018-07-24T17:06:30Z")

</div>

Thank you so much for the quick reply, i have 100 million documents in the index and the number of shrads are 5 and i want to increase that to 30, so my questions is which would be the fast and efficient way to achieve this.

---

<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:** [July 24, 2018, 5:08pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/4 "2018-07-24T17:08:32Z")

</div>

As you may not have created the index with settings that allow you to use the [split index API](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html), the only way will be to reindex your data into a new index with the correct settings.

---

<div class="post-metadata">

**Author:** ![mikebd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikebd/32/33437_2.png) [@mikebd](https://discuss.elastic.co/u/mikebd)\
**Post date:** [July 24, 2018, 5:12pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/5 "2018-07-24T17:12:19Z")

</div>

Do you really want to have 30 shards? Usual guidance is for a shard to be 30 GB before considering multiple shards, ymmv depending on resources and usage patterns.

It is more common to add replicas to increase distributed search capability depending on resources available.

---

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [July 24, 2018, 5:33pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/6 "2018-07-24T17:33:06Z")

</div>

thanks,  
no i didn't do the setting for the split index API. is it a default setting.

---

<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:** [July 24, 2018, 7:40pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/7 "2018-07-24T19:40:40Z")

</div>

No it is not, so you will need to reindex.

---

<div class="post-metadata">

**Author:** ![cool\_arun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_arun/32/70465_2.png) [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Post date:** [July 24, 2018, 8:18pm UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/8 "2018-07-24T20:18:37Z")

</div>

thanks christian, so if i go for re-indexing for the 100 million documents, will it be a slow process or it depends on my disk space. the reason is i want to know approximate time it will take for re-indexing, is there any way can i calculate that.

---

<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:** [July 25, 2018, 5:41am UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/9 "2018-07-25T05:41:39Z")

</div>

This depends on your data, mappings and hardware so there is no general way to calculate how long it will take.

---

<div class="post-metadata">

**Author:** ![Abhilash\_Bolla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilash_bolla/32/26840_2.png) [@Abhilash\_Bolla](https://discuss.elastic.co/u/Abhilash_Bolla)\
**Post date:** [July 25, 2018, 6:37am UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/10 "2018-07-25T06:37:31Z")

</div>

If you aren't using aggressive analyzers like ngram, stemmers, synonyms, etc and if number of fields are \< 15 per document, it should be over in half a day. Are you performing the reindex in a cluster or a single node? If you do it in a cluster, beware of the client timeouts. For such large data of 100 million documents, I would prefer to write a custom script than using a single HTTP request (like what reindex API does).

---

<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:** [August 22, 2018, 6:37am UTC](https://discuss.elastic.co/t/increase-the-number-of-shrads/141425/11 "2018-08-22T06:37:33Z")

</div>

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