# How do you change the default number of shards?

**URL:** <https://discuss.elastic.co/t/how-do-you-change-the-default-number-of-shards/1508>\
**Category:** Elasticsearch\
**Created:** [May 28, 2015, 6:14pm UTC](https://discuss.elastic.co/t/how-do-you-change-the-default-number-of-shards/1508 "2015-05-28T18:14:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![spuder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spuder/32/44895_2.png) [@spuder](https://discuss.elastic.co/u/spuder)\
**Post date:** [May 28, 2015, 7:04pm UTC](https://discuss.elastic.co/t/how-do-you-change-the-default-number-of-shards/1508/3 "2015-05-28T19:04:39Z")

</div>

Thanks,

So just to clarify, I should take my logstash-template.json and convert it from this:

```json
{
  "logstash" : {
    "order" : 0,
    "template" : "logstash-*",
    "settings" : {
      "number_of_shards": 2
    },
    "mappings" : {
      "_default_" : {
...

```

to this

```json
{
    "template" : "logstash-*",
    "settings" : {
      "number_of_shards": 2
    },
    "mappings" : {
      "_default_" : {

```

---

_[View the full topic](https://discuss.elastic.co/t/how-do-you-change-the-default-number-of-shards/1508)._
