# Elastic search creates 5 shards in default in Elastic search 0.14.0

**URL:** <https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706>\
**Category:** Elasticsearch\
**Created:** [December 29, 2010, 6:18am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706 "2010-12-29T06:18:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthil\_prabhu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@senthil\_prabhu](https://discuss.elastic.co/u/senthil_prabhu)\
**Post date:** [December 29, 2010, 6:18am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/1 "2010-12-29T06:18:31Z")

</div>

Hi,

I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
shards in default. Why its create like this ?.

Another question here is where is the replica's stored?

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [December 29, 2010, 8:02am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/2 "2010-12-29T08:02:06Z")

</div>

Hi,

if not set otherwise then 5 shards is the default used by Elastic Search.  
Can you recreate your issue with simple curl example?

As for the replicas, Elastic Search makes sure that index shard and its  
replica are not stored on the same node. This means that if you have an  
index shard with one replica you need at least two (data) nodes to have them  
allocated, if any replica can not be allocated due to insufficient number of  
nodes available then you can learn it via Health API (status will be  
yellow).

Check the below links for more details:  
[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluster/health/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluster/health/)  
[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluster/health/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluster/health/)  
[http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machine.html](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machine.html)

Regards,  
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu [senthilsebi@gmail.com](mailto:senthilsebi@gmail.com)wrote:

> Hi,
> 
> I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> shards in default. Why its create like this ?.
> 
> Another question here is where is the replica's stored?

---

<div class="post-metadata">

**Author:** ![senthil\_prabhu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@senthil\_prabhu](https://discuss.elastic.co/u/senthil_prabhu)\
**Post date:** [December 29, 2010, 9:21am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/3 "2010-12-29T09:21:16Z")

</div>

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '[http://localhost:9200/testdb2/](http://localhost:9200/testdb2/)' -d '{index :  
{number\_of\_shards  
: 3, number\_of\_replicas : 0}}'

after getting database status it shows like below.

"settings":{"index.number\_of\_shards":"5","index.number\_of\_replica  
s":"1"},

On Dec 29, 1:02 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:

> Hi,
> 
> if not set otherwise then 5 shards is the default used by Elastic Search.  
> Can you recreate your issue with simple curl example?
> 
> As for the replicas, Elastic Search makes sure that index shard and its  
> replica are not stored on the same node. This means that if you have an  
> index shard with one replica you need at least two (data) nodes to have them  
> allocated, if any replica can not be allocated due to insufficient number of  
> nodes available then you can learn it via Health API (status will be  
> yellow).
> 
> Check the below links for more details:[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)...  
> [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste...](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste...)[http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machin](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machin)...
> 
> Regards,  
> Lukas
> 
> On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu [senthils...@gmail.com](mailto:senthils...@gmail.com)wrote:
> 
> > Hi,
> 
> > I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> > shards in default. Why its create like this ?.
> 
> > Another question here is where is the replica's stored?

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [December 29, 2010, 9:49am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/4 "2010-12-29T09:49:58Z")

</div>

Hi,

this sounds like an issue to me. Do you want to open a ticket for this?

Regards,  
Lukas

On Wed, Dec 29, 2010 at 10:21 AM, senthil prabhu [senthilsebi@gmail.com](mailto:senthilsebi@gmail.com)wrote:

> Thaks for your response...
> 
> I am using the curl command to create database is
> 
> $ curl -XPUT '[http://localhost:9200/testdb2/](http://localhost:9200/testdb2/)' -d '{index :  
> {number\_of\_shards  
> : 3, number\_of\_replicas : 0}}'
> 
> after getting database status it shows like below.
> 
> "settings":{"index.number\_of\_shards":"5","index.number\_of\_replica  
> s":"1"},
> 
> On Dec 29, 1:02 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> 
> > Hi,
> > 
> > if not set otherwise then 5 shards is the default used by Elastic Search.  
> > Can you recreate your issue with simple curl example?
> > 
> > As for the replicas, Elastic Search makes sure that index shard and its  
> > replica are not stored on the same node. This means that if you have an  
> > index shard with one replica you need at least two (data) nodes to have  
> > them  
> > allocated, if any replica can not be allocated due to insufficient number  
> > of  
> > nodes available then you can learn it via Health API (status will be  
> > yellow).
> > 
> > Check the below links for more details:  
> > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)...  
> > \<[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)..  
> > .\>[http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machin](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machin)...
> > 
> > Regards,  
> > Lukas
> > 
> > On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu \<[senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > wrote:
> > 
> > > Hi,
> > 
> > > I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> > > shards in default. Why its create like this ?.
> > 
> > > Another question here is where is the replica's stored?

---

<div class="post-metadata">

**Author:** ![senthil\_prabhu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@senthil\_prabhu](https://discuss.elastic.co/u/senthil_prabhu)\
**Post date:** [December 29, 2010, 10:00am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/5 "2010-12-29T10:00:41Z")

</div>

But i am using like this means its working fine for me... Just now i  
check this......

$ curl -XPUT '[http://localhost:9200/twitter/](http://localhost:9200/twitter/)' -d '  
index :  
number\_of\_shards : 3  
number\_of\_replicas : 2  
'

On Dec 29, 2:49 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:

> Hi,
> 
> this sounds like an issue to me. Do you want to open a ticket for this?
> 
> Regards,  
> Lukas
> 
> On Wed, Dec 29, 2010 at 10:21 AM, senthil prabhu [senthils...@gmail.com](mailto:senthils...@gmail.com)wrote:
> 
> > Thaks for your response...
> 
> > I am using the curl command to create database is
> 
> > $ curl -XPUT '[http://localhost:9200/testdb2/'-d](http://localhost:9200/testdb2/'-d) '{index :  
> > {number\_of\_shards  
> > : 3, number\_of\_replicas : 0}}'
> 
> > after getting database status it shows like below.
> 
> > "settings":{"index.number\_of\_shards":"5","index.number\_of\_replica  
> > s":"1"},
> 
> > On Dec 29, 1:02 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> > 
> > > Hi,
> 
> > > if not set otherwise then 5 shards is the default used by Elastic Search.  
> > > Can you recreate your issue with simple curl example?
> 
> > > As for the replicas, Elastic Search makes sure that index shard and its  
> > > replica are not stored on the same node. This means that if you have an  
> > > index shard with one replica you need at least two (data) nodes to have  
> > > them  
> > > allocated, if any replica can not be allocated due to insufficient number  
> > > of  
> > > nodes available then you can learn it via Health API (status will be  
> > > yellow).
> 
> > > Check the below links for more details:  
> > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)...  
> > > \<[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)..  
> > > .\>[http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machin](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machin)...
> 
> > > Regards,  
> > > Lukas
> 
> > > On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu \<[senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > > wrote:
> 
> > > > Hi,
> 
> > > > I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> > > > shards in default. Why its create like this ?.
> 
> > > > Another question here is where is the replica's stored?

---

<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:** [December 29, 2010, 10:13am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/6 "2010-12-29T10:13:47Z")

</div>

Hi,

Yea, this is a regression in 0.14, opened an issue:  
[Issues · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/closed#issue/578) and  
pushed a fix to master. This will probably require an 0.14.1 release to fix  
it....

On Wed, Dec 29, 2010 at 12:00 PM, senthil prabhu [senthilsebi@gmail.com](mailto:senthilsebi@gmail.com)wrote:

> But i am using like this means its working fine for me... Just now i  
> check this......
> 
> $ curl -XPUT '[http://localhost:9200/twitter/](http://localhost:9200/twitter/)' -d '  
> index :  
> number\_of\_shards : 3  
> number\_of\_replicas : 2  
> '
> 
> On Dec 29, 2:49 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> 
> > Hi,
> > 
> > this sounds like an issue to me. Do you want to open a ticket for this?
> > 
> > Regards,  
> > Lukas
> > 
> > On Wed, Dec 29, 2010 at 10:21 AM, senthil prabhu \<[senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > wrote:
> > 
> > > Thaks for your response...
> > 
> > > I am using the curl command to create database is
> > 
> > > $ curl -XPUT '[http://localhost:9200/testdb2/'-d](http://localhost:9200/testdb2/'-d) '{index :  
> > > {number\_of\_shards  
> > > : 3, number\_of\_replicas : 0}}'
> > 
> > > after getting database status it shows like below.
> > 
> > > "settings":{"index.number\_of\_shards":"5","index.number\_of\_replica  
> > > s":"1"},
> > 
> > > On Dec 29, 1:02 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> > > 
> > > > Hi,
> > 
> > > > if not set otherwise then 5 shards is the default used by Elastic  
> > > > Search.  
> > > > Can you recreate your issue with simple curl example?
> > 
> > > > As for the replicas, Elastic Search makes sure that index shard and  
> > > > its  
> > > > replica are not stored on the same node. This means that if you have  
> > > > an  
> > > > index shard with one replica you need at least two (data) nodes to  
> > > > have  
> > > > them  
> > > > allocated, if any replica can not be allocated due to insufficient  
> > > > number  
> > > > of  
> > > > nodes available then you can learn it via Health API (status will be  
> > > > yellow).
> > 
> > > > Check the below links for more details:  
> > > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste).  
> > > > ..  
> > > > \<  
> > > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)..  
> > > > .\>  
> > > > [http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machin](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machin)...
> > 
> > > > Regards,  
> > > > Lukas
> > 
> > > > On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu \<  
> > > > [senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > > > wrote:
> > 
> > > > > Hi,
> > 
> > > > > I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> > > > > shards in default. Why its create like this ?.
> > 
> > > > > Another question here is where is the replica's stored?

---

<div class="post-metadata">

**Author:** ![senthil\_prabhu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@senthil\_prabhu](https://discuss.elastic.co/u/senthil_prabhu)\
**Post date:** [December 29, 2010, 10:19am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/7 "2010-12-29T10:19:03Z")

</div>

Thank you Shay...

On Dec 29, 3:13 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Hi,
> 
> Yea, this is a regression in 0.14, opened an issue:[Issues · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/closed#issue/578and)  
> pushed a fix to master. This will probably require an 0.14.1 release to fix  
> it....
> 
> On Wed, Dec 29, 2010 at 12:00 PM, senthil prabhu [senthils...@gmail.com](mailto:senthils...@gmail.com)wrote:
> 
> > But i am using like this means its working fine for me... Just now i  
> > check this......
> 
> > $ curl -XPUT '[http://localhost:9200/twitter/'-d](http://localhost:9200/twitter/'-d) '  
> > index :  
> > number\_of\_shards : 3  
> > number\_of\_replicas : 2  
> > '
> 
> > On Dec 29, 2:49 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> > 
> > > Hi,
> 
> > > this sounds like an issue to me. Do you want to open a ticket for this?
> 
> > > Regards,  
> > > Lukas
> 
> > > On Wed, Dec 29, 2010 at 10:21 AM, senthil prabhu \<[senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > > wrote:
> 
> > > > Thaks for your response...
> 
> > > > I am using the curl command to create database is
> 
> > > > $ curl -XPUT '[http://localhost:9200/testdb2/'-d'](http://localhost:9200/testdb2/'-d'){index :  
> > > > {number\_of\_shards  
> > > > : 3, number\_of\_replicas : 0}}'
> 
> > > > after getting database status it shows like below.
> 
> > > > "settings":{"index.number\_of\_shards":"5","index.number\_of\_replica  
> > > > s":"1"},
> 
> > > > On Dec 29, 1:02 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> > > > 
> > > > > Hi,
> 
> > > > > if not set otherwise then 5 shards is the default used by Elastic  
> > > > > Search.  
> > > > > Can you recreate your issue with simple curl example?
> 
> > > > > As for the replicas, Elastic Search makes sure that index shard and  
> > > > > its  
> > > > > replica are not stored on the same node. This means that if you have  
> > > > > an  
> > > > > index shard with one replica you need at least two (data) nodes to  
> > > > > have  
> > > > > them  
> > > > > allocated, if any replica can not be allocated due to insufficient  
> > > > > number  
> > > > > of  
> > > > > nodes available then you can learn it via Health API (status will be  
> > > > > yellow).
> 
> > > > > Check the below links for more details:  
> > > > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste).  
> > > > > ..  
> > > > > \<  
> > > > > [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/admin/cluste](http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluste)..  
> > > > > .\>  
> > > > > [http://www.elasticsearch.com/blog/2010/02/16/searchengine\_time\_machin](http://www.elasticsearch.com/blog/2010/02/16/searchengine_time_machin)...
> 
> > > > > Regards,  
> > > > > Lukas
> 
> > > > > On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu \<  
> > > > > [senthils...@gmail.com](mailto:senthils...@gmail.com)  
> > > > > wrote:
> 
> > > > > > Hi,
> 
> > > > > > I am indexing a doc with 1 shards and 0 replicas, but it creates 5  
> > > > > > shards in default. Why its create like this ?.
> 
> > > > > > Another question here is where is the replica's stored?

---

<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:14am UTC](https://discuss.elastic.co/t/elastic-search-creates-5-shards-in-default-in-elastic-search-0-14-0/3706/8 "2017-07-06T04:14:44Z")

</div>


