A complete index is broken up into shards.
So if you have 10k documents in a index , and you assign 2 shards and 0
replica , 5k documents will sit on one node , and the rest of 5k document
will sit on the next node.
When a search request comes , the request is applied on both nodes and the
result is merged to obtain the final result.
Thus depending on the size of your index , you need to specify the number
If you increase the replica , a copy of data in each node is stored in some
other node too. (This is to make sure even if one node goes down , you get
to have the entire data)
Also one thing to remember here ,- you cant increase the number of shards
after you set it for a index. But you can increase number of replica.
On Wed, Nov 2, 2011 at 1:59 PM, kalyan email@example.com wrote:
I am kind of new to this project.I have some doubts regarding
Shard,replica and index.
As per as i know
1.When we create 10k index with 2 shards and 1 replica on node 1 ,then
if I up node 2,node 2 must have 2 shards of 10k memory and node 1 as
2.On node 1, 2 shards will be created each shard having 5k memory.
Can u please clarify me whether above two scenarios are correct?
What is the concept behind creating more than one shard on single
node or on multiple nodes?
Its better if u tell any documents on basics of elastic search.