# Not specifying Id and replication characteristics

**URL:** <https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578>\
**Category:** Elasticsearch\
**Created:** [September 12, 2013, 8:40pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578 "2013-09-12T20:40:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwin\_Sathya](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Ashwin\_Sathya](https://discuss.elastic.co/u/Ashwin_Sathya)\
**Post date:** [September 12, 2013, 8:40pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/1 "2013-09-12T20:40:48Z")

</div>

Hi,

I have setup a simple 3-node cluster with just 1 shard and 2 replica per index. And I am not specifying the id, during indexing.  
Indexing seems to create three different copies of the same item with a different \_id on each of the replicas. I am not sure what is happening.

Is this the default behavior ? How does this affect search queries ? Will I be getting duplicating results when I query ?  
Should I start specifying the id myself ?

Thanks,  
Ashwin Sathya

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 12, 2013, 8:44pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/2 "2013-09-12T20:44:17Z")

</div>

I'm not sure I understood:

You ran only one index call and you have 3 documents with different IDs, I mean elasticsearch \_id ?  
If so, could you gist a curl recreation of what you did so far?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 sept. 2013 à 22:40, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

> Hi,
> 
> I have setup a simple 3-node cluster with just 1 shard and 2 replica per index. And I am not specifying the id, during indexing.  
> Indexing seems to create three different copies of the same item with a different \_id on each of the replicas. I am not sure what is happening.
> 
> Is this the default behavior ? How does this affect search queries ? Will I be getting duplicating results when I query ?  
> Should I start specifying the id myself ?
> 
> ## Thanks, Ashwin Sathya
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ashwin\_Sathya](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Ashwin\_Sathya](https://discuss.elastic.co/u/Ashwin_Sathya)\
**Post date:** [September 12, 2013, 9:02pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/3 "2013-09-12T21:02:49Z")

</div>

Unfortunately I won't be able to right now.  
When I don't specify a \_id, during a PUT call, \_id is automatically assigned by Elasticsearch. Now how does the replication treat this document ? Its just creates a copy or indexes as a separate document ?

* * *

From: David Pilato[mailto:david@pilato.fr](mailto:david@pilato.fr)  
Sent: 13-09-2013 02:14  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: Not specifying Id and replication characteristics

I'm not sure I understood:

You ran only one index call and you have 3 documents with different IDs, I mean elasticsearch \_id ?  
If so, could you gist a curl recreation of what you did so far?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 sept. 2013 à 22:40, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

> Hi,
> 
> I have setup a simple 3-node cluster with just 1 shard and 2 replica per index. And I am not specifying the id, during indexing.  
> Indexing seems to create three different copies of the same item with a different \_id on each of the replicas. I am not sure what is happening.
> 
> Is this the default behavior ? How does this affect search queries ? Will I be getting duplicating results when I query ?  
> Should I start specifying the id myself ?
> 
> ## Thanks, Ashwin Sathya
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 12, 2013, 9:09pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/4 "2013-09-12T21:09:41Z")

</div>

It creates somehow copies. I mean that you won't see duplicates as when you search only one shard is hit (primary or replica)

Makes sense?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 sept. 2013 à 23:02, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

Unfortunately I won't be able to right now.  
When I don't specify a \_id, during a PUT call, \_id is automatically assigned by Elasticsearch. Now how does the replication treat this document ? Its just creates a copy or indexes as a separate document ?  
From: David Pilato  
Sent: 13-09-2013 02:14  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: Not specifying Id and replication characteristics

I'm not sure I understood:

You ran only one index call and you have 3 documents with different IDs, I mean elasticsearch \_id ?  
If so, could you gist a curl recreation of what you did so far?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 sept. 2013 à 22:40, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

> Hi,
> 
> I have setup a simple 3-node cluster with just 1 shard and 2 replica per index. And I am not specifying the id, during indexing.  
> Indexing seems to create three different copies of the same item with a different \_id on each of the replicas. I am not sure what is happening.
> 
> Is this the default behavior ? How does this affect search queries ? Will I be getting duplicating results when I query ?  
> Should I start specifying the id myself ?
> 
> ## Thanks, Ashwin Sathya
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ashwin\_Sathya](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Ashwin\_Sathya](https://discuss.elastic.co/u/Ashwin_Sathya)\
**Post date:** [September 12, 2013, 9:16pm UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/5 "2013-09-12T21:16:49Z")

</div>

Okay.  
Now makes sense.  
Thanks!!

* * *

From: David Pilato[mailto:david@pilato.fr](mailto:david@pilato.fr)  
Sent: 13-09-2013 02:39  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: Not specifying Id and replication characteristics

It creates somehow copies. I mean that you won't see duplicates as when you search only one shard is hit (primary or replica)

Makes sense?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 sept. 2013 à 23:02, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

Unfortunately I won't be able to right now.  
When I don't specify a \_id, during a PUT call, \_id is automatically assigned by Elasticsearch. Now how does the replication treat this document ? Its just creates a copy or indexes as a separate document ?  
From: David Pilato  
Sent: 13-09-2013 02:14  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: Not specifying Id and replication characteristics

I'm not sure I understood:

You ran only one index call and you have 3 documents with different IDs, I mean elasticsearch \_id ?  
If so, could you gist a curl recreation of what you did so far?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 sept. 2013 à 22:40, R Ashwin Sathya [ashwin.sathya@outlook.com](mailto:ashwin.sathya@outlook.com) a écrit :

> Hi,
> 
> I have setup a simple 3-node cluster with just 1 shard and 2 replica per index. And I am not specifying the id, during indexing.  
> Indexing seems to create three different copies of the same item with a different \_id on each of the replicas. I am not sure what is happening.
> 
> Is this the default behavior ? How does this affect search queries ? Will I be getting duplicating results when I query ?  
> Should I start specifying the id myself ?
> 
> ## Thanks, Ashwin Sathya
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:16am UTC](https://discuss.elastic.co/t/not-specifying-id-and-replication-characteristics/13578/6 "2017-07-06T02:16:47Z")

</div>

Closed on July 6, 2017, 2:16am UTC


