# Changing number of shards for new indices

**URL:** https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969
**Category:** Elasticsearch
**Created:** [July 30, 2014, 7:22am UTC](https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969 "2014-07-30T07:22:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Kingdom\_Joy](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kingdom\_Joy](https://discuss.elastic.co/u/Kingdom_Joy)
#### Post date: [July 30, 2014, 7:22am UTC](https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969/1 "2014-07-30T07:22:23Z")

</div>

Hello,

Right now I have two nodes in my ES (part of ELK stack) cluster and 1 shard  
for each index. I would like to change number of shards to two for future  
indices. Can I do this by changing config file and restarting logstash?  
Will it change number of shards for indices created after restarting ES?  
Will it break existing indices?

Thank you!

--  
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/5909f618-241d-4323-aa4b-d018dac7bf96%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5909f618-241d-4323-aa4b-d018dac7bf96%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Kingdom\_Joy](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kingdom\_Joy](https://discuss.elastic.co/u/Kingdom_Joy)
#### Post date: [July 30, 2014, 7:27am UTC](https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969/2 "2014-07-30T07:27:28Z")

</div>

Typo in my previous message, here's corrected post:

Hello,

Right now I have two nodes in my ES (part of ELK stack) cluster and 1 shard  
for each index. I would like to change number of shards to two for future  
indices. Can I do this by changing config file and restarting ES? Will it  
change number of shards for indices created after restarting ES? Will it  
break existing indices?

Thank you!

--  
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/b1ba628e-c82f-4d68-a798-bc74255f34cc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b1ba628e-c82f-4d68-a798-bc74255f34cc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 30, 2014, 8:17am UTC](https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969/3 "2014-07-30T08:17:42Z")

</div>

It doesn't change existing indexes only new ones.  
You can either do the setting change via the API or in the config, if you  
choose the latter you will need a restart.

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.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 30 July 2014 17:27, Kingdom Joy [thekingdomofjoy@gmail.com](mailto:thekingdomofjoy@gmail.com) wrote:

> Typo in my previous message, here's corrected post:
> 
> Hello,
> 
> Right now I have two nodes in my ES (part of ELK stack) cluster and 1  
> shard for each index. I would like to change number of shards to two for  
> future indices. Can I do this by changing config file and restarting ES?  
> Will it change number of shards for indices created after restarting ES?  
> Will it break existing indices?
> 
> Thank you!
> 
> --  
> 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/b1ba628e-c82f-4d68-a798-bc74255f34cc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b1ba628e-c82f-4d68-a798-bc74255f34cc%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b1ba628e-c82f-4d68-a798-bc74255f34cc%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b1ba628e-c82f-4d68-a798-bc74255f34cc%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/CAEM624b9fhhBO3dUz\_reMy7jLmBoX23G-5zUpVagHk%2BBnd2NrA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b9fhhBO3dUz_reMy7jLmBoX23G-5zUpVagHk%2BBnd2NrA%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:12am UTC](https://discuss.elastic.co/t/changing-number-of-shards-for-new-indices/18969/4 "2017-07-06T01:12:18Z")

</div>


