Elastic search creates 5 shards in default in Elastic search 0.14.0


(senthil prabhu) #1

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?


(Lukáš Vlček) #2

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/blog/2010/02/16/searchengine_time_machine.html

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu senthilsebi@gmail.comwrote:

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?


(senthil prabhu) #3

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '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 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/blog/2010/02/16/searchengine_time_machin...

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu senthils...@gmail.comwrote:

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?


(Lukáš Vlček) #4

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.comwrote:

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '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 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/blog/2010/02/16/searchengine_time_machin...

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu <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?


(senthil prabhu) #5

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

$ curl -XPUT '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 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.comwrote:

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '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 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/blog/2010/02/16/searchengine_time_machin...

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu <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?


(Shay Banon) #6

Hi,

Yea, this is a regression in 0.14, opened an issue:
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.comwrote:

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

$ curl -XPUT '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 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
wrote:

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '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 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/blog/2010/02/16/searchengine_time_machin...

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu <
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?


(senthil prabhu) #7

Thank you Shay...

On Dec 29, 3:13 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Yea, this is a regression in 0.14, opened an issue: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.comwrote:

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

$ curl -XPUT '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 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
wrote:

Thaks for your response...

I am using the curl command to create database is

$ curl -XPUT '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 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/blog/2010/02/16/searchengine_time_machin...

Regards,
Lukas

On Wed, Dec 29, 2010 at 7:18 AM, senthil prabhu <
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?


(system) #8