# Question on read consistency

**URL:** <https://discuss.elastic.co/t/question-on-read-consistency/14232>\
**Category:** Elasticsearch\
**Created:** [November 3, 2013, 6:37am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232 "2013-11-03T06:37:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [November 3, 2013, 6:37am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/1 "2013-11-03T06:37:46Z")

</div>

Hello everyone - I have something to clarify on the read consistency level  
of elastic-search. I have read that _'GET' (not search) is always read  
consistent_ and I am not sure I understand how this works when the write  
consistency level is the default quorum.

Lets say that the document is saved and since the mode is set to 'quorum'  
(n/2+1) nodes get this document in their transaction log. Now immediately  
after this, a 'GET' is performed and lets say that this GET request goes to  
a different node and not to the one which formed the quorum for the write  
request.

In this case, wouldn't we get an older copy of the document for this 'GET'  
request?

-Amit.

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 3, 2013, 8:46am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/2 "2013-11-03T08:46:43Z")

</div>

Write consistency in ES is not directly connected to read, it is just that  
indexing a document returns early with default quorum consistency and you  
can't be sure this document has been indexed on all replica shards.

The translog is per shard, so if a GET request goes to a different shard,  
you can't be sure about realtime get.

You have several options with default quorum: use refresh (which is  
expensive), or use no replica while indexing, or use preference on primary  
shard while read, since the primary shard is the first one written to.

Jörg

--  
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:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [November 3, 2013, 1:36pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/3 "2013-11-03T13:36:06Z")

</div>

> You have several options with default quorum: use refresh (which is  
> expensive), or use no replica while indexing, or use preference on primary  
> shard while read, since the primary shard is the first one written to.

Jörg, how can we do that?

--  
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:** [November 3, 2013, 1:51pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/4 "2013-11-03T13:51:37Z")

</div>

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

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

> Le 3 nov. 2013 à 14:36, Itamar Syn-Hershko [itamar@code972.com](mailto:itamar@code972.com) a écrit :
> 
> You have several options with default quorum: use refresh (which is expensive), or use no replica while indexing, or use preference on primary shard while read, since the primary shard is the first one written to.

Jörg, how can we do that?

--  
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:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [November 3, 2013, 1:52pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/5 "2013-11-03T13:52:54Z")

</div>

Awesome, thanks

On Sun, Nov 3, 2013 at 3:51 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-preference.html)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 3 nov. 2013 à 14:36, Itamar Syn-Hershko [itamar@code972.com](mailto:itamar@code972.com) a écrit :
> 
> > You have several options with default quorum: use refresh (which is  
> > expensive), or use no replica while indexing, or use preference on primary  
> > shard while read, since the primary shard is the first one written to.
> 
> Jörg, how can we do that?
> 
> --  
> 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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 4, 2013, 8:51am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/6 "2013-11-04T08:51:22Z")

</div>

Hey,

I think the write consistency parameter just checks for availability of  
shards (in order to make the operation to be allowed), but indexing (unless  
replication is configured async) still needs to happen into all shards. So  
the realtime GET is independent from the number of shards.

--Alex

On Sun, Nov 3, 2013 at 9:46 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<[joergprante@gmail.com](mailto:joergprante@gmail.com)

> wrote:

> Write consistency in ES is not directly connected to read, it is just that  
> indexing a document returns early with default quorum consistency and you  
> can't be sure this document has been indexed on all replica shards.
> 
> The translog is per shard, so if a GET request goes to a different shard,  
> you can't be sure about realtime get.
> 
> You have several options with default quorum: use refresh (which is  
> expensive), or use no replica while indexing, or use preference on primary  
> shard while read, since the primary shard is the first one written to.
> 
> Jörg
> 
> --  
> 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:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [November 4, 2013, 5:49pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/7 "2013-11-04T17:49:59Z")

</div>

Hi Alex - If the indexing happens into all the shards then I am not sure of  
the role of 'write consistency' configuration. For instance if I continue  
to have write consistency set to quorum, writing to all the available  
shards would be expensive, isn't?  
I am not sure I understand why the write would happen to ALL the shards if  
the write consistency is set to 'quorum'.

-Amit.

On Mon, Nov 4, 2013 at 12:51 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> I think the write consistency parameter just checks for availability of  
> shards (in order to make the operation to be allowed), but indexing (unless  
> replication is configured async) still needs to happen into all shards. So  
> the realtime GET is independent from the number of shards.
> 
> --Alex
> 
> On Sun, Nov 3, 2013 at 9:46 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> 
> > Write consistency in ES is not directly connected to read, it is just  
> > that indexing a document returns early with default quorum consistency and  
> > you can't be sure this document has been indexed on all replica shards.
> > 
> > The translog is per shard, so if a GET request goes to a different shard,  
> > you can't be sure about realtime get.
> > 
> > You have several options with default quorum: use refresh (which is  
> > expensive), or use no replica while indexing, or use preference on primary  
> > shard while read, since the primary shard is the first one written to.
> > 
> > Jörg
> > 
> > --  
> > 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:** [November 4, 2013, 6:13pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/8 "2013-11-04T18:13:11Z")

</div>

It basically checks that you have at least enough shards to replicate to. If not, operation will fail.

If set to all, that means all shards must be allocated on the cluster to accept the index operation.

Makes sense?

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

Le 4 nov. 2013 à 18:49, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) a écrit :

> Hi Alex - If the indexing happens into all the shards then I am not sure of the role of 'write consistency' configuration. For instance if I continue to have write consistency set to quorum, writing to all the available shards would be expensive, isn't?  
> I am not sure I understand why the write would happen to ALL the shards if the write consistency is set to 'quorum'.
> 
> -Amit.
> 
> On Mon, Nov 4, 2013 at 12:51 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:
> 
> > Hey,
> > 
> > I think the write consistency parameter just checks for availability of shards (in order to make the operation to be allowed), but indexing (unless replication is configured async) still needs to happen into all shards. So the realtime GET is independent from the number of shards.
> > 
> > --Alex
> > 
> > On Sun, Nov 3, 2013 at 9:46 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) [joergprante@gmail.com](mailto:joergprante@gmail.com) wrote:
> > 
> > > Write consistency in ES is not directly connected to read, it is just that indexing a document returns early with default quorum consistency and you can't be sure this document has been indexed on all replica shards.
> > > 
> > > The translog is per shard, so if a GET request goes to a different shard, you can't be sure about realtime get.
> > > 
> > > You have several options with default quorum: use refresh (which is expensive), or use no replica while indexing, or use preference on primary shard while read, since the primary shard is the first one written to.
> > > 
> > > Jörg
> > > 
> > > --  
> > > 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:** ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)\
**Post date:** [November 4, 2013, 7:07pm UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/9 "2013-11-04T19:07:07Z")

</div>

Hi David - Thanks for explaining it and my apology if there is something  
obvious that I am missing.

_\> If set to all, that means all shards must be allocated on the cluster to  
accept the index operation._  
Totally understand that if set to all, then all shards would get the  
document (either in transaction log or index) and then my 'GET' operation  
is guaranteed to fetch the updated copy.

However when the setting is for 'quorum', how is it guaranteed that my GET  
will get the updated copy even when the request is routed to a shard which  
didn't form the quorum.

-Amit.

On Mon, Nov 4, 2013 at 10:13 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> It basically checks that you have at least enough shards to replicate to.  
> If not, operation will fail.
> 
> If set to all, that means all shards must be allocated on the cluster to  
> accept the index operation.
> 
> Makes sense?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 4 nov. 2013 à 18:49, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) a écrit :
> 
> Hi Alex - If the indexing happens into all the shards then I am not sure  
> of the role of 'write consistency' configuration. For instance if I  
> continue to have write consistency set to quorum, writing to all the  
> available shards would be expensive, isn't?  
> I am not sure I understand why the write would happen to ALL the shards if  
> the write consistency is set to 'quorum'.
> 
> -Amit.
> 
> On Mon, Nov 4, 2013 at 12:51 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:
> 
> > Hey,
> > 
> > I think the write consistency parameter just checks for availability of  
> > shards (in order to make the operation to be allowed), but indexing (unless  
> > replication is configured async) still needs to happen into all shards. So  
> > the realtime GET is independent from the number of shards.
> > 
> > --Alex
> > 
> > On Sun, Nov 3, 2013 at 9:46 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> > [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> > 
> > > Write consistency in ES is not directly connected to read, it is just  
> > > that indexing a document returns early with default quorum consistency and  
> > > you can't be sure this document has been indexed on all replica shards.
> > > 
> > > The translog is per shard, so if a GET request goes to a different  
> > > shard, you can't be sure about realtime get.
> > > 
> > > You have several options with default quorum: use refresh (which is  
> > > expensive), or use no replica while indexing, or use preference on primary  
> > > shard while read, since the primary shard is the first one written to.
> > > 
> > > Jörg
> > > 
> > > --  
> > > 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:** ![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:** [November 5, 2013, 12:10am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/10 "2013-11-05T00:10:11Z")

</div>

When all shards are not allocated, then with quorum (default), a minimum amount of shard must be allocated.

If true, _all_ allocated shards will get the document before the operation is considered as successful.

When some shards are missing, when they will be allocated, they will first have to be synchronized before accepting any request. So a shard which is not fully started won't be hit by your GET request.

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

Le 4 nov. 2013 à 20:07, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) a écrit :

> Hi David - Thanks for explaining it and my apology if there is something obvious that I am missing.
> 
> > If set to all, that means all shards must be allocated on the cluster to accept the index operation.  
> > Totally understand that if set to all, then all shards would get the document (either in transaction log or index) and then my 'GET' operation is guaranteed to fetch the updated copy.
> 
> However when the setting is for 'quorum', how is it guaranteed that my GET will get the updated copy even when the request is routed to a shard which didn't form the quorum.
> 
> -Amit.
> 
> On Mon, Nov 4, 2013 at 10:13 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > It basically checks that you have at least enough shards to replicate to. If not, operation will fail.
> > 
> > If set to all, that means all shards must be allocated on the cluster to accept the index operation.
> > 
> > Makes sense?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 4 nov. 2013 à 18:49, Amit Soni [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) a écrit :
> > 
> > > Hi Alex - If the indexing happens into all the shards then I am not sure of the role of 'write consistency' configuration. For instance if I continue to have write consistency set to quorum, writing to all the available shards would be expensive, isn't?  
> > > I am not sure I understand why the write would happen to ALL the shards if the write consistency is set to 'quorum'.
> > > 
> > > -Amit.
> > > 
> > > On Mon, Nov 4, 2013 at 12:51 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:
> > > 
> > > > Hey,
> > > > 
> > > > I think the write consistency parameter just checks for availability of shards (in order to make the operation to be allowed), but indexing (unless replication is configured async) still needs to happen into all shards. So the realtime GET is independent from the number of shards.
> > > > 
> > > > --Alex
> > > > 
> > > > On Sun, Nov 3, 2013 at 9:46 AM, [joergprante@gmail.com](mailto:joergprante@gmail.com) [joergprante@gmail.com](mailto:joergprante@gmail.com) wrote:
> > > > 
> > > > > Write consistency in ES is not directly connected to read, it is just that indexing a document returns early with default quorum consistency and you can't be sure this document has been indexed on all replica shards.
> > > > > 
> > > > > The translog is per shard, so if a GET request goes to a different shard, you can't be sure about realtime get.
> > > > > 
> > > > > You have several options with default quorum: use refresh (which is expensive), or use no replica while indexing, or use preference on primary shard while read, since the primary shard is the first one written to.
> > > > > 
> > > > > Jörg
> > > > > 
> > > > > --  
> > > > > 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).

--  
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:08am UTC](https://discuss.elastic.co/t/question-on-read-consistency/14232/11 "2017-07-06T02:08:57Z")

</div>


