# Changing the number of shards and replicas of an existing index

**URL:** https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829
**Category:** Elasticsearch
**Created:** [February 24, 2010, 3:38pm UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829 "2010-02-24T15:38:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Bruno\_Dumon](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Bruno\_Dumon](https://discuss.elastic.co/u/Bruno_Dumon)
#### Post date: [February 24, 2010, 3:38pm UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829/1 "2010-02-24T15:38:19Z")

</div>

Hi,

Do you have any plans or thoughts on allowing to change  
(increase/decrease) the number of shards and replicas of an existing  
index? It seems like currently these can only be specified at index  
creation time.

--  
Bruno Dumon  
Outerthought

> **[About NGDATA - NGDATA](https://www.ngdata.com/about-3/)**
>
> NGDATA empowers enterprises seeking customer lifetime value through Big Data management & machine learning technologies.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [February 24, 2010, 6:27pm UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829/2 "2010-02-24T18:27:29Z")

</div>

Yes, certainly, though the effort involved in supporting it is quite big  
(its quite complex when putting search engine into the picture, compared  
with the very simple models like dynamo, for example).

But, most cases you won't necessarily need it because of the "multi-index"  
support elasticsearch provides. For example, lets take a twitter example. We  
can decide to create an index per user, or create an index per day. The  
ability to perform _all_ operations in elasticsearch across more than one  
index is intentional to support that.

This gives you added benefit. For example, if you have an index per user in  
the twitter example, you can search on your friends and their friends (and  
_score_ differently based on the relationship you have with them) quite  
easily.

-shay.banon

On Wed, Feb 24, 2010 at 5:38 PM, Bruno Dumon [bruno@outerthought.org](mailto:bruno@outerthought.org) wrote:

> Hi,
> 
> Do you have any plans or thoughts on allowing to change  
> (increase/decrease) the number of shards and replicas of an existing  
> index? It seems like currently these can only be specified at index  
> creation time.
> 
> --  
> Bruno Dumon  
> Outerthought  
> [http://outerthought.org/](http://outerthought.org/)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [February 24, 2010, 6:37pm UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829/3 "2010-02-24T18:37:33Z")

</div>

One more thing I forgot to mention. Even with one index, and the out of the  
box default of 5 shards with 1 replica each, you can scale easily up to 10  
machines (just for the index, of course you can create more indices and  
scale even more) which gives you hugh amount of storage (10s of terra) and  
great search scalability. Also, changing the number of replicas dynamically  
should be much simpler. If search scalability is what you are after.

-shay.banon

On Wed, Feb 24, 2010 at 8:27 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Yes, certainly, though the effort involved in supporting it is quite big  
> (its quite complex when putting search engine into the picture, compared  
> with the very simple models like dynamo, for example).
> 
> But, most cases you won't necessarily need it because of the "multi-index"  
> support elasticsearch provides. For example, lets take a twitter example. We  
> can decide to create an index per user, or create an index per day. The  
> ability to perform _all_ operations in elasticsearch across more than one  
> index is intentional to support that.
> 
> This gives you added benefit. For example, if you have an index per user in  
> the twitter example, you can search on your friends and their friends (and  
> _score_ differently based on the relationship you have with them) quite  
> easily.
> 
> -shay.banon
> 
> On Wed, Feb 24, 2010 at 5:38 PM, Bruno Dumon [bruno@outerthought.org](mailto:bruno@outerthought.org)wrote:
> 
> > Hi,
> > 
> > Do you have any plans or thoughts on allowing to change  
> > (increase/decrease) the number of shards and replicas of an existing  
> > index? It seems like currently these can only be specified at index  
> > creation time.
> > 
> > --  
> > Bruno Dumon  
> > Outerthought  
> > [http://outerthought.org/](http://outerthought.org/)

---

<div class="post-metadata">

### Author: ![Bruno\_Dumon](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Bruno\_Dumon](https://discuss.elastic.co/u/Bruno_Dumon)
#### Post date: [February 25, 2010, 12:49pm UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829/4 "2010-02-25T12:49:43Z")

</div>

Thanks for the clarification.

Using multiple indices a a way to scale is an interesting thought, I  
had not considered it.

Changing the number of shards probably needs less flexibility than  
changing the number of replicas, though it would be nice if there was  
some way to grow, even if it would be just by doubling the number of  
current shards (i.e. splitting each shard into two).

But anyway, the current flexibility and power of Elasticsearch is  
already quite impressive!

On Wed, Feb 24, 2010 at 7:37 PM, Shay Banon  
[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> One more thing I forgot to mention. Even with one index, and the out of the  
> box default of 5 shards with 1 replica each, you can scale easily up to 10  
> machines (just for the index, of course you can create more indices and  
> scale even more) which gives you hugh amount of storage (10s of terra) and  
> great search scalability. Also, changing the number of replicas dynamically  
> should be much simpler. If search scalability is what you are after.  
> -shay.banon
> 
> On Wed, Feb 24, 2010 at 8:27 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)  
> wrote:
> 
> > Yes, certainly, though the effort involved in supporting it is quite big  
> > (its quite complex when putting search engine into the picture, compared  
> > with the very simple models like dynamo, for example).  
> > But, most cases you won't necessarily need it because of the "multi-index"  
> > support elasticsearch provides. For example, lets take a twitter example. We  
> > can decide to create an index per user, or create an index per day. The  
> > ability to perform _all_ operations in elasticsearch across more than one  
> > index is intentional to support that.  
> > This gives you added benefit. For example, if you have an index per user  
> > in the twitter example, you can search on your friends and their friends  
> > (and _score_ differently based on the relationship you have with them) quite  
> > easily.  
> > -shay.banon
> > 
> > On Wed, Feb 24, 2010 at 5:38 PM, Bruno Dumon [bruno@outerthought.org](mailto:bruno@outerthought.org)  
> > wrote:
> > 
> > > Hi,
> > > 
> > > Do you have any plans or thoughts on allowing to change  
> > > (increase/decrease) the number of shards and replicas of an existing  
> > > index? It seems like currently these can only be specified at index  
> > > creation time.

--  
Bruno Dumon  
Outerthought  
[http://outerthought.org/](http://outerthought.org/)

---

<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 6, 2017, 4:25am UTC](https://discuss.elastic.co/t/changing-the-number-of-shards-and-replicas-of-an-existing-index/2829/5 "2017-07-06T04:25:32Z")

</div>


