# Definition help

**URL:** <https://discuss.elastic.co/t/definition-help/6493>\
**Category:** Elasticsearch\
**Created:** [January 25, 2012, 1:35pm UTC](https://discuss.elastic.co/t/definition-help/6493 "2012-01-25T13:35:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [January 25, 2012, 1:35pm UTC](https://discuss.elastic.co/t/definition-help/6493/1 "2012-01-25T13:35:31Z")

</div>

Hi,  
I've read the online guides and searched for past threads. I'm  
trying to get a clear definition of the following terms but having  
trouble.

1. Node - I think this means an instance of ES running on a server.
2. Index - I know what this means in Lucene, but is it identical in ES  
or is there more? e.g. logical definition? or physical?
3. Shard - I see that indices are created with 'shards'. But what IS a  
shard and why does it exist? When I have an index with 5 shards, does  
that mean 5 physical lucene indices that are separate?
4. Replica - I read that a shard has a replica. How does that work? If  
I have 5 shards, I need 5 replicas for each shard as failover data? Or  
1 replica merges the data of 5 shards into itself?

Maybe there is a simple diagram somewhere showing these relationships.  
Reading the API docs to learn these relationships is rather hard. Any  
help appreciated.

thanks.

---

<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:** [January 25, 2012, 4:43pm UTC](https://discuss.elastic.co/t/definition-help/6493/2 "2012-01-25T16:43:55Z")

</div>

On Wednesday, January 25, 2012 at 3:35 PM, project2501 wrote:

> Hi,  
> I've read the online guides and searched for past threads. I'm  
> trying to get a clear definition of the following terms but having  
> trouble.
> 
> 1. Node - I think this means an instance of ES running on a server.  
> Yes, and instance of elasticsearch.
> 2. Index - I know what this means in Lucene, but is it identical in ES  
> or is there more? e.g. logical definition? or physical?

An index has is a logical concept that encapsulates specific data. It it broken down into shards and shards can have replicas. It also hold mappings definition and specific settings associated with it.

> 1. Shard - I see that indices are created with 'shards'. But what IS a  
> shard and why does it exist? When I have an index with 5 shards, does  
> that mean 5 physical lucene indices that are separate?

Yes, and if you have replicas, then more.

> 1. Replica - I read that a shard has a replica. How does that work? If  
> I have 5 shards, I need 5 replicas for each shard as failover data? Or  
> 1 replica merges the data of 5 shards into itself?

If you have an index with 5 shards and index.number\_of\_replicas set to 1, then each shard will have a single replica (two copies).

> Maybe there is a simple diagram somewhere showing these relationships.  
> Reading the API docs to learn these relationships is rather hard. Any  
> help appreciated.

> **[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.

> **[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.

> thanks.

---

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [January 26, 2012, 1:51pm UTC](https://discuss.elastic.co/t/definition-help/6493/3 "2012-01-26T13:51:29Z")

</div>

Thanks Shay.

So a shard is a 'physical' index, in the lucene sense? And an ES index  
is broken down into multiple physical indexes for some reason?  
Performance? scaling?

Appreciate the info.

On Jan 25, 11:43 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> On Wednesday, January 25, 2012 at 3:35 PM, project2501 wrote:
> 
> > Hi,  
> > I've read the online guides and searched for past threads. I'm  
> > trying to get a clear definition of the following terms but having  
> > trouble.
> 
> > 1. Node - I think this means an instance of ES running on a server.
> 
> Yes, and instance of elasticsearch.
> 
> > 1. Index - I know what this means in Lucene, but is it identical in ES  
> > or is there more? e.g. logical definition? or physical?
> 
> An index has is a logical concept that encapsulates specific data. It it broken down into shards and shards can have replicas. It also hold mappings definition and specific settings associated with it.
> 
> > 1. Shard - I see that indices are created with 'shards'. But what IS a  
> > shard and why does it exist? When I have an index with 5 shards, does  
> > that mean 5 physical lucene indices that are separate?
> 
> Yes, and if you have replicas, then more.
> 
> > 1. Replica - I read that a shard has a replica. How does that work? If  
> > I have 5 shards, I need 5 replicas for each shard as failover data? Or  
> > 1 replica merges the data of 5 shards into itself?
> 
> If you have an index with 5 shards and index.number\_of\_replicas set to 1, then each shard will have a single replica (two copies).
> 
> > Maybe there is a simple diagram somewhere showing these relationships.  
> > Reading the API docs to learn these relationships is rather hard. Any  
> > help appreciated.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2010/02/08/es-distributed-diagram...http://www.elasticsearch.org/videos/2011/08/09/road-to-a-distributed-)...
> 
> > thanks.

---

<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:** [January 26, 2012, 5:29pm UTC](https://discuss.elastic.co/t/definition-help/6493/4 "2012-01-26T17:29:08Z")

</div>

Hi,

If an index is broken down to 5 shards then it means that each shard can be  
allocated on different physical machine (and thus each shard can grow up to  
the capabilities of given machine). If you were to sum up all 5 shards you  
would get a combined index that would not fit into any machine out of those  
five. So yes, this help scalability as well as performance because all  
shards can be processed (for example searched) concurrently.

Just note that elasticsearch has the distributed notion in its DNA since  
the very beginning so everything in it is about distributed, concurrent and  
possibly [near] real time processing (including index and search  
operations). That is why you need index sharding and many other concepts  
found in it.

Regards,  
Lukas

On Thu, Jan 26, 2012 at 2:51 PM, project2501 [darreng5150@gmail.com](mailto:darreng5150@gmail.com) wrote:

> Thanks Shay.
> 
> So a shard is a 'physical' index, in the lucene sense? And an ES index  
> is broken down into multiple physical indexes for some reason?  
> Performance? scaling?
> 
> Appreciate the info.
> 
> On Jan 25, 11:43 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > On Wednesday, January 25, 2012 at 3:35 PM, project2501 wrote:
> > 
> > > Hi,  
> > > I've read the online guides and searched for past threads. I'm  
> > > trying to get a clear definition of the following terms but having  
> > > trouble.
> > 
> > > 1. Node - I think this means an instance of ES running on a server.
> > 
> > Yes, and instance of elasticsearch.
> > 
> > > 1. Index - I know what this means in Lucene, but is it identical in ES  
> > > or is there more? e.g. logical definition? or physical?
> > 
> > An index has is a logical concept that encapsulates specific data. It it  
> > broken down into shards and shards can have replicas. It also hold mappings  
> > definition and specific settings associated with it.
> > 
> > > 1. Shard - I see that indices are created with 'shards'. But what IS a  
> > > shard and why does it exist? When I have an index with 5 shards, does  
> > > that mean 5 physical lucene indices that are separate?
> > 
> > Yes, and if you have replicas, then more.
> > 
> > > 1. Replica - I read that a shard has a replica. How does that work? If  
> > > I have 5 shards, I need 5 replicas for each shard as failover data? Or  
> > > 1 replica merges the data of 5 shards into itself?
> > 
> > If you have an index with 5 shards and index.number\_of\_replicas set to  
> > 1, then each shard will have a single replica (two copies).
> > 
> > > Maybe there is a simple diagram somewhere showing these relationships.  
> > > Reading the API docs to learn these relationships is rather hard. Any  
> > > help appreciated.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2010/02/08/es-distributed-diagram...http://www.elasticsearch.org/videos/2011/08/09/road-to-a-distributed-).  
> ..
> 
> > > thanks.

---

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [January 28, 2012, 12:42pm UTC](https://discuss.elastic.co/t/definition-help/6493/5 "2012-01-28T12:42:17Z")

</div>

Thanks Lukas.

So if I have a cluster of 100 machines and I want to have an index for  
'documents'.  
Would I have 1 'document' index and 100 shards? Then the elasticsearch  
nodes discover  
each other and decide how to distribute the load among them?

On Jan 26, 12:29 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:

> Hi,
> 
> If an index is broken down to 5 shards then it means that each shard can be  
> allocated on different physical machine (and thus each shard can grow up to  
> the capabilities of given machine). If you were to sum up all 5 shards you  
> would get a combined index that would not fit into any machine out of those  
> five. So yes, this help scalability as well as performance because all  
> shards can be processed (for example searched) concurrently.
> 
> Just note that elasticsearch has the distributed notion in its DNA since  
> the very beginning so everything in it is about distributed, concurrent and  
> possibly [near] real time processing (including index and search  
> operations). That is why you need index sharding and many other concepts  
> found in it.
> 
> Regards,  
> Lukas
> 
> On Thu, Jan 26, 2012 at 2:51 PM, project2501 [darreng5...@gmail.com](mailto:darreng5...@gmail.com) wrote:
> 
> > Thanks Shay.
> 
> > So a shard is a 'physical' index, in the lucene sense? And an ES index  
> > is broken down into multiple physical indexes for some reason?  
> > Performance? scaling?
> 
> > Appreciate the info.
> 
> > On Jan 25, 11:43 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > On Wednesday, January 25, 2012 at 3:35 PM, project2501 wrote:
> > > 
> > > > Hi,  
> > > > I've read the online guides and searched for past threads. I'm  
> > > > trying to get a clear definition of the following terms but having  
> > > > trouble.
> 
> > > > 1. Node - I think this means an instance of ES running on a server.
> 
> > > Yes, and instance of elasticsearch.
> 
> > > > 1. Index - I know what this means in Lucene, but is it identical in ES  
> > > > or is there more? e.g. logical definition? or physical?
> 
> > > An index has is a logical concept that encapsulates specific data. It it  
> > > broken down into shards and shards can have replicas. It also hold mappings  
> > > definition and specific settings associated with it.
> 
> > > > 1. Shard - I see that indices are created with 'shards'. But what IS a  
> > > > shard and why does it exist? When I have an index with 5 shards, does  
> > > > that mean 5 physical lucene indices that are separate?
> 
> > > Yes, and if you have replicas, then more.
> 
> > > > 1. Replica - I read that a shard has a replica. How does that work? If  
> > > > I have 5 shards, I need 5 replicas for each shard as failover data? Or  
> > > > 1 replica merges the data of 5 shards into itself?
> 
> > > If you have an index with 5 shards and index.number\_of\_replicas set to  
> > > 1, then each shard will have a single replica (two copies).
> 
> > > > Maybe there is a simple diagram somewhere showing these relationships.  
> > > > Reading the API docs to learn these relationships is rather hard. Any  
> > > > help appreciated.
> 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2010/02/08/es-distributed-diagram)....  
> > ..
> 
> > > > thanks.

---

<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:** [January 28, 2012, 2:23pm UTC](https://discuss.elastic.co/t/definition-help/6493/6 "2012-01-28T14:23:23Z")

</div>

Yes.  
I would recommend you to simply give ES a try. It would help you to get  
familiar with it much faster btw.

Regards,  
Lukáš

Dne 28.1.2012 13:42 "project2501" [darreng5150@gmail.com](mailto:darreng5150@gmail.com) napsal(a):

> Thanks Lukas.
> 
> So if I have a cluster of 100 machines and I want to have an index for  
> 'documents'.  
> Would I have 1 'document' index and 100 shards? Then the elasticsearch  
> nodes discover  
> each other and decide how to distribute the load among them?
> 
> On Jan 26, 12:29 pm, Lukáš Vlček [lukas.vl...@gmail.com](mailto:lukas.vl...@gmail.com) wrote:
> 
> > Hi,
> > 
> > If an index is broken down to 5 shards then it means that each shard can  
> > be  
> > allocated on different physical machine (and thus each shard can grow up  
> > to  
> > the capabilities of given machine). If you were to sum up all 5 shards  
> > you  
> > would get a combined index that would not fit into any machine out of  
> > those  
> > five. So yes, this help scalability as well as performance because all  
> > shards can be processed (for example searched) concurrently.
> > 
> > Just note that elasticsearch has the distributed notion in its DNA since  
> > the very beginning so everything in it is about distributed, concurrent  
> > and  
> > possibly [near] real time processing (including index and search  
> > operations). That is why you need index sharding and many other concepts  
> > found in it.
> > 
> > Regards,  
> > Lukas
> > 
> > On Thu, Jan 26, 2012 at 2:51 PM, project2501 [darreng5...@gmail.com](mailto:darreng5...@gmail.com)  
> > wrote:
> > 
> > > Thanks Shay.
> > 
> > > So a shard is a 'physical' index, in the lucene sense? And an ES index  
> > > is broken down into multiple physical indexes for some reason?  
> > > Performance? scaling?
> > 
> > > Appreciate the info.
> > 
> > > On Jan 25, 11:43 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > 
> > > > On Wednesday, January 25, 2012 at 3:35 PM, project2501 wrote:
> > > > 
> > > > > Hi,  
> > > > > I've read the online guides and searched for past threads. I'm  
> > > > > trying to get a clear definition of the following terms but having  
> > > > > trouble.
> > 
> > > > > 1. Node - I think this means an instance of ES running on a server.
> > 
> > > > Yes, and instance of elasticsearch.
> > 
> > > > > 1. Index - I know what this means in Lucene, but is it identical  
> > > > > in ES  
> > > > > or is there more? e.g. logical definition? or physical?
> > 
> > > > An index has is a logical concept that encapsulates specific data.  
> > > > It it  
> > > > broken down into shards and shards can have replicas. It also hold  
> > > > mappings  
> > > > definition and specific settings associated with it.
> > 
> > > > > 1. Shard - I see that indices are created with 'shards'. But what  
> > > > > IS a  
> > > > > shard and why does it exist? When I have an index with 5 shards,  
> > > > > does  
> > > > > that mean 5 physical lucene indices that are separate?
> > 
> > > > Yes, and if you have replicas, then more.
> > 
> > > > > 1. Replica - I read that a shard has a replica. How does that  
> > > > > work? If  
> > > > > I have 5 shards, I need 5 replicas for each shard as failover  
> > > > > data? Or  
> > > > > 1 replica merges the data of 5 shards into itself?
> > 
> > > > If you have an index with 5 shards and index.number\_of\_replicas set  
> > > > to  
> > > > 1, then each shard will have a single replica (two copies).
> > 
> > > > > Maybe there is a simple diagram somewhere showing these  
> > > > > relationships.  
> > > > > Reading the API docs to learn these relationships is rather hard.  
> > > > > Any  
> > > > > help appreciated.
> > 
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/videos/2010/02/08/es-distributed-diagram)..  
> > > ..  
> > > ..
> > 
> > > > > thanks.

---

<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, 3:41am UTC](https://discuss.elastic.co/t/definition-help/6493/7 "2017-07-06T03:41:09Z")

</div>


