# Changing elasticsearch index's shard-count on the next index-rotation

**URL:** https://discuss.elastic.co/t/changing-elasticsearch-indexs-shard-count-on-the-next-index-rotation/17148
**Category:** Elasticsearch
**Created:** [April 23, 2014, 11:34am UTC](https://discuss.elastic.co/t/changing-elasticsearch-indexs-shard-count-on-the-next-index-rotation/17148 "2014-04-23T11:34:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![erbdex](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erbdex/32/1520_2.png) [@erbdex](https://discuss.elastic.co/u/erbdex)
#### Post date: [April 23, 2014, 11:34am UTC](https://discuss.elastic.co/t/changing-elasticsearch-indexs-shard-count-on-the-next-index-rotation/17148/1 "2014-04-23T11:34:15Z")

</div>

i have an ELK(Elasticsearch-Kibana) stack wherein the elasticsearch node  
has the default shard value of 5. Logs are pushed to it in logstash format(  
logstash-YYYY.MM.DD), which- correct me if i am wrong- are indexed  
date-wise.

Since i cannot change the shard count of an existing index without  
reindexing, i want to increase the number of shards to 8 when _the next  
index is created_. i figured that the ES-API allows on-the-fly persistent  
changes.

How do i go about doing this?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 26, 2014, 12:13am UTC](https://discuss.elastic.co/t/changing-elasticsearch-indexs-shard-count-on-the-next-index-rotation/17148/2 "2014-04-26T00:13:22Z")

</div>

Hey,

if you use logstash, you could change the default index template to use 8  
shards. See

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Wed, Apr 23, 2014 at 7:34 AM, Abhishek Tiwari [erbdex@gmail.com](mailto:erbdex@gmail.com) wrote:

> i have an ELK(Elasticsearch-Kibana) stack wherein the elasticsearch node  
> has the default shard value of 5. Logs are pushed to it in logstash format(  
> logstash-YYYY.MM.DD), which- correct me if i am wrong- are indexed  
> date-wise.
> 
> Since i cannot change the shard count of an existing index without  
> reindexing, i want to increase the number of shards to 8 when _the next  
> index is created_. i figured that the ES-API allows on-the-fly persistent  
> changes.
> 
> How do i go about doing this?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9f5f2d93-bb58-40f8-b7f1-a60239d98ce0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9yBmaabFJYe8ezK\_bL65%3DvGcxjO5b8BzO1tfrPhRMMDw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9yBmaabFJYe8ezK_bL65%3DvGcxjO5b8BzO1tfrPhRMMDw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:33am UTC](https://discuss.elastic.co/t/changing-elasticsearch-indexs-shard-count-on-the-next-index-rotation/17148/3 "2017-07-06T01:33:22Z")

</div>


