# Efficiency of GET by doc id

**URL:** <https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932>\
**Category:** Elasticsearch\
**Created:** [February 20, 2014, 7:43pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932 "2014-02-20T19:43:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [February 20, 2014, 7:43pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/1 "2014-02-20T19:43:38Z")

</div>

When using routing is GET by doc id still efficient? I am assuming when  
routing is used the hash algorithm uses routing value instead of doc value  
so based on that fact is the GET by doc id still efficient?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqOZxnaCVTD14YW%2B2QpMxPcx%3DAn77UVsSZZSg-0T74enw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqOZxnaCVTD14YW%2B2QpMxPcx%3DAn77UVsSZZSg-0T74enw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 20, 2014, 11:49pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/2 "2014-02-20T23:49:35Z")

</div>

The only difference is in one case the doc ID is used to hash, and in the  
routing case the routing ID is used to hash. Other than that, execution is  
the same between the two.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/eb3ac73f-8e31-49b6-9106-3bdf830dbe6f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eb3ac73f-8e31-49b6-9106-3bdf830dbe6f%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [February 21, 2014, 12:02am UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/3 "2014-02-21T00:02:57Z")

</div>

I understand that, but my question was the execution path during GET when  
using docid which was indexed with routing id. Does it search all the  
shards?

On Thu, Feb 20, 2014 at 3:49 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:

> The only difference is in one case the doc ID is used to hash, and in the  
> routing case the routing ID is used to hash. Other than that, execution is  
> the same between the two.
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/eb3ac73f-8e31-49b6-9106-3bdf830dbe6f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eb3ac73f-8e31-49b6-9106-3bdf830dbe6f%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWoR1GqyJSSeODdvPu7wK2HswjjbOfr5RtQQSZzyq%2B4QtA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWoR1GqyJSSeODdvPu7wK2HswjjbOfr5RtQQSZzyq%2B4QtA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 21, 2014, 2:42am UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/4 "2014-02-21T02:42:14Z")

</div>

Not sure I follow, but if routing is supplied, the routing value will be  
used to hash to a single shard on which the GET is performed on. If routing  
is not supplied, the doc ID will be used to hash to a single shard on which  
the GET is performed on. In either case, 1 shard is used to GET the  
document.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [February 21, 2014, 3:37am UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/5 "2014-02-21T03:37:53Z")

</div>

How does hash algorithm work on 2 variable at the same time? For eg:

1. insert a doc with route value 1
2. ES creates doc id "A"
3. Send a GET for doc id "A" with no routing value - In this case how is ES  
able to find just one shard since it doesn't have routing value that it can  
use to find the shard? In other word if doc A was inserted using hash of  
value 1 then how can it find that one shard when a request comes in with no  
routing value?

On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:

> Not sure I follow, but if routing is supplied, the routing value will be  
> used to hash to a single shard on which the GET is performed on. If routing  
> is not supplied, the doc ID will be used to hash to a single shard on which  
> the GET is performed on. In either case, 1 shard is used to GET the  
> document.
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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:** [February 21, 2014, 6:28am UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/6 "2014-02-21T06:28:17Z")

</div>

Es will route your doc to shard corresponding to routing value 1.  
If you search for docA without routing value, 2 options:

You are lucky: hash id A correspond to the same shard as routing value 1: you get the doc  
You are not: you won't find the doc.

So, when using routing value at index time, you must give routing value at GET time.

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

Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a écrit :

How does hash algorithm work on 2 variable at the same time? For eg:

1. insert a doc with route value 1
2. ES creates doc id "A"
3. Send a GET for doc id "A" with no routing value - In this case how is ES able to find just one shard since it doesn't have routing value that it can use to find the shard? In other word if doc A was inserted using hash of value 1 then how can it find that one shard when a request comes in with no routing value?

> ## On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote: Not sure I follow, but if routing is supplied, the routing value will be used to hash to a single shard on which the GET is performed on. If routing is not supplied, the doc ID will be used to hash to a single shard on which the GET is performed on. In either case, 1 shard is used to GET the document.
> 
> 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).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [February 21, 2014, 4:04pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/7 "2014-02-21T16:04:23Z")

</div>

That clears things up. Thanks!

Is there a way to be able to create a doc such that one can find the  
document with the id and without routing value? May be by using docId as a  
field in the indexed doc?

On Thu, Feb 20, 2014 at 10:28 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Es will route your doc to shard corresponding to routing value 1.  
> If you search for docA without routing value, 2 options:
> 
> You are lucky: hash id A correspond to the same shard as routing value 1:  
> you get the doc  
> You are not: you won't find the doc.
> 
> So, when using routing value at index time, you must give routing value at  
> GET time.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a écrit :
> 
> How does hash algorithm work on 2 variable at the same time? For eg:
> 
> 1. insert a doc with route value 1
> 2. ES creates doc id "A"
> 3. Send a GET for doc id "A" with no routing value - In this case how is  
> ES able to find just one shard since it doesn't have routing value that it  
> can use to find the shard? In other word if doc A was inserted using hash  
> of value 1 then how can it find that one shard when a request comes in with  
> no routing value?
> 
> On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:
> 
> > Not sure I follow, but if routing is supplied, the routing value will be  
> > used to hash to a single shard on which the GET is performed on. If routing  
> > is not supplied, the doc ID will be used to hash to a single shard on which  
> > the GET is performed on. In either case, 1 shard is used to GET the  
> > document.
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr)  
> .
> 
> 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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1\_j2og%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1_j2og%40mail.gmail.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:** [February 21, 2014, 4:21pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/8 "2014-02-21T16:21:15Z")

</div>

I guess that in that case you should index "\_id" field (mapping) and run a search on "\_id"?

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

Le 21 février 2014 à 17:04:27, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a écrit:

That clears things up. Thanks!

Is there a way to be able to create a doc such that one can find the document with the id and without routing value? May be by using docId as a field in the indexed doc?

On Thu, Feb 20, 2014 at 10:28 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
Es will route your doc to shard corresponding to routing value 1.  
If you search for docA without routing value, 2 options:

You are lucky: hash id A correspond to the same shard as routing value 1: you get the doc  
You are not: you won't find the doc.

So, when using routing value at index time, you must give routing value at GET time.

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

Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a écrit :

How does hash algorithm work on 2 variable at the same time? For eg:

1. insert a doc with route value 1
2. ES creates doc id "A"
3. Send a GET for doc id "A" with no routing value - In this case how is ES able to find just one shard since it doesn't have routing value that it can use to find the shard? In other word if doc A was inserted using hash of value 1 then how can it find that one shard when a request comes in with no routing value?

## On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote: Not sure I follow, but if routing is supplied, the routing value will be used to hash to a single shard on which the GET is performed on. If routing is not supplied, the doc ID will be used to hash to a single shard on which the GET is performed on. In either case, 1 shard is used to GET the document.

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr).

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1\_j2og%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1_j2og%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 21, 2014, 5:03pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/9 "2014-02-21T17:03:55Z")

</div>

David has the ideal solution, however just wanted to point out one key  
difference in the get API is that it would look for a document in the  
transaction log before it looks in the index. So if you execute a search  
query after an insert, but before a refresh/flush, you will not see the  
changes. This scenario depends on each individual use case and settings.  
Probably a non-issue with the default refresh rate of 1 second and normal  
search constraints.

--  
Ivan

On Fri, Feb 21, 2014 at 8:21 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I guess that in that case you should index "\_id" field (mapping) and run a  
> search on "\_id"?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 21 février 2014 à 17:04:27, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a  
> écrit:
> 
> That clears things up. Thanks!
> 
> Is there a way to be able to create a doc such that one can find the  
> document with the id and without routing value? May be by using docId as a  
> field in the indexed doc?
> 
> On Thu, Feb 20, 2014 at 10:28 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Es will route your doc to shard corresponding to routing value 1.  
> > If you search for docA without routing value, 2 options:
> > 
> > You are lucky: hash id A correspond to the same shard as routing value 1:  
> > you get the doc  
> > You are not: you won't find the doc.
> > 
> > So, when using routing value at index time, you must give routing value  
> > at GET time.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a  
> > écrit :
> > 
> > How does hash algorithm work on 2 variable at the same time? For eg:
> > 
> > 1. insert a doc with route value 1
> > 2. ES creates doc id "A"
> > 3. Send a GET for doc id "A" with no routing value - In this case how is  
> > ES able to find just one shard since it doesn't have routing value that it  
> > can use to find the shard? In other word if doc A was inserted using hash  
> > of value 1 then how can it find that one shard when a request comes in with  
> > no routing value?
> > 
> > On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:
> > 
> > > ## Not sure I follow, but if routing is supplied, the routing value will be used to hash to a single shard on which the GET is performed on. If routing is not supplied, the doc ID will be used to hash to a single shard on which the GET is performed on. In either case, 1 shard is used to GET the document.
> > > 
> > > 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).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr).
> > 
> > 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1\_j2og%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1_j2og%40mail.gmail.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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local)  
> .
> 
> 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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3\_-uy5sgHQvoPvQ\_\_T9cUvmbV5KA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3_-uy5sgHQvoPvQ__T9cUvmbV5KA%40mail.gmail.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:** [February 21, 2014, 5:35pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/10 "2014-02-21T17:35:55Z")

</div>

+1 I forget to mention it… But he was asking for searching a doc, not getting a doc 🙂

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

Le 21 février 2014 à 18:03:58, Ivan Brusic ([ivan@brusic.com](mailto:ivan@brusic.com)) a écrit:

David has the ideal solution, however just wanted to point out one key difference in the get API is that it would look for a document in the transaction log before it looks in the index. So if you execute a search query after an insert, but before a refresh/flush, you will not see the changes. This scenario depends on each individual use case and settings. Probably a non-issue with the default refresh rate of 1 second and normal search constraints.

--  
Ivan

On Fri, Feb 21, 2014 at 8:21 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
I guess that in that case you should index "\_id" field (mapping) and run a search on "\_id"?

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

Le 21 février 2014 à 17:04:27, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a écrit:

That clears things up. Thanks!

Is there a way to be able to create a doc such that one can find the document with the id and without routing value? May be by using docId as a field in the indexed doc?

On Thu, Feb 20, 2014 at 10:28 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
Es will route your doc to shard corresponding to routing value 1.  
If you search for docA without routing value, 2 options:

You are lucky: hash id A correspond to the same shard as routing value 1: you get the doc  
You are not: you won't find the doc.

So, when using routing value at index time, you must give routing value at GET time.

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

Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a écrit :

How does hash algorithm work on 2 variable at the same time? For eg:

1. insert a doc with route value 1
2. ES creates doc id "A"
3. Send a GET for doc id "A" with no routing value - In this case how is ES able to find just one shard since it doesn't have routing value that it can use to find the shard? In other word if doc A was inserted using hash of value 1 then how can it find that one shard when a request comes in with no routing value?

## On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote: Not sure I follow, but if routing is supplied, the routing value will be used to hash to a single shard on which the GET is performed on. If routing is not supplied, the doc ID will be used to hash to a single shard on which the GET is performed on. In either case, 1 shard is used to GET the document.

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr).

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). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1\_j2og%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1_j2og%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local).

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3\_-uy5sgHQvoPvQ\_\_T9cUvmbV5KA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3_-uy5sgHQvoPvQ__T9cUvmbV5KA%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53078e7b.2443a858.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53078e7b.2443a858.5655%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [February 21, 2014, 5:43pm UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/11 "2014-02-21T17:43:58Z")

</div>

Thanks for mentioning that. I was really thinking that there might be some  
magic 🙂 and I would be able to do a GET by ID but without a routing value.  
I was trying to avoid search on id since that now requires touching all the  
shards.

On Fri, Feb 21, 2014 at 9:35 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> +1 I forget to mention it... But he was asking for searching a doc, not  
> getting a doc 🙂
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 21 février 2014 à 18:03:58, Ivan Brusic ([ivan@brusic.com](mailto:ivan@brusic.com)) a écrit:
> 
> David has the ideal solution, however just wanted to point out one key  
> difference in the get API is that it would look for a document in the  
> transaction log before it looks in the index. So if you execute a search  
> query after an insert, but before a refresh/flush, you will not see the  
> changes. This scenario depends on each individual use case and settings.  
> Probably a non-issue with the default refresh rate of 1 second and normal  
> search constraints.
> 
> --  
> Ivan
> 
> On Fri, Feb 21, 2014 at 8:21 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > I guess that in that case you should index "\_id" field (mapping) and  
> > run a search on "\_id"?
> > 
> > ```
> > --
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 21 février 2014 à 17:04:27, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a  
> > écrit:
> > 
> > That clears things up. Thanks!
> > 
> > Is there a way to be able to create a doc such that one can find the  
> > document with the id and without routing value? May be by using docId as a  
> > field in the indexed doc?
> > 
> > On Thu, Feb 20, 2014 at 10:28 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > Es will route your doc to shard corresponding to routing value 1.  
> > > If you search for docA without routing value, 2 options:
> > > 
> > > You are lucky: hash id A correspond to the same shard as routing value  
> > > 1: you get the doc  
> > > You are not: you won't find the doc.
> > > 
> > > So, when using routing value at index time, you must give routing value  
> > > at GET time.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 21 févr. 2014 à 04:37, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) a  
> > > écrit :
> > > 
> > > How does hash algorithm work on 2 variable at the same time? For eg:
> > > 
> > > 1. insert a doc with route value 1
> > > 2. ES creates doc id "A"
> > > 3. Send a GET for doc id "A" with no routing value - In this case how is  
> > > ES able to find just one shard since it doesn't have routing value that it  
> > > can use to find the shard? In other word if doc A was inserted using hash  
> > > of value 1 then how can it find that one shard when a request comes in with  
> > > no routing value?
> > > 
> > > On Thu, Feb 20, 2014 at 6:42 PM, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:
> > > 
> > > > ## Not sure I follow, but if routing is supplied, the routing value will be used to hash to a single shard on which the GET is performed on. If routing is not supplied, the doc ID will be used to hash to a single shard on which the GET is performed on. In either case, 1 shard is used to GET the document.
> > > > 
> > > > 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).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/667559d8-5c0d-471f-ad54-a68eff38c8bc%40googlegroups.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).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQkg3EYkyEJzmDAE%2BdoTPbzPsG9zJGfrfbTjgq2GE19Q%40mail.gmail.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).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8A4925F4-0492-4931-8C33-780815BFE692%40pilato.fr).
> > > 
> > > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1\_j2og%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWp2Du8MF%3DmZrCCVSyb8r4N%2B%3D6cucS3eWYBR20gn1_j2og%40mail.gmail.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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53077cfb.41a7c4c9.5655%40MacBook-Air-de-David.local).
> > 
> > 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3\_-uy5sgHQvoPvQ\_\_T9cUvmbV5KA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBx0GDz5yv7vQ9L%3Df3_-uy5sgHQvoPvQ__T9cUvmbV5KA%40mail.gmail.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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.53078e7b.2443a858.5655%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53078e7b.2443a858.5655%40MacBook-Air-de-David.local)  
> .
> 
> 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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrP4B-NMME78DNd%2BoH1%2BAKaM48it0yANDo-ejLLvSuLyA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrP4B-NMME78DNd%2BoH1%2BAKaM48it0yANDo-ejLLvSuLyA%40mail.gmail.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, 1:48am UTC](https://discuss.elastic.co/t/efficiency-of-get-by-doc-id/15932/12 "2017-07-06T01:48:16Z")

</div>


