# Get document by Key faster

**URL:** <https://discuss.elastic.co/t/get-document-by-key-faster/6541>\
**Category:** Elasticsearch\
**Created:** [January 30, 2012, 4:47pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541 "2012-01-30T16:47:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernandojose\_Boiton\_](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Fernandojose\_Boiton\_](https://discuss.elastic.co/u/Fernandojose_Boiton_)\
**Post date:** [January 30, 2012, 4:47pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/1 "2012-01-30T16:47:18Z")

</div>

Hello! At work we are starting to interact with ElasticSearch we have a  
.Net Web application that index a document. Using MSMQ we notify our  
service bus an event and when processing that event. The service bus call  
ES to get the previous indexed document. We are having some problems  
because ES don't have available the document yet.

Doing some research we found the "refresh" option, but is announced as  
something that will impact performance. Also we saw the "flush" operation  
that occur each 5000 documents. Are we lost on this?

What are your recommended configurations? Any particular clue about how to  
set shards/replicas based on a faster document availability?  
Action.Write\_consistency makes any difference on this?

We are using NEST as .Net client and elasticsearch 0.16.0 is running as  
service in two windows server 2008 installed with elasticsearch-setup (  
[https://github.com/rgl/elasticsearch-setup/downloads](https://github.com/rgl/elasticsearch-setup/downloads))

Thank y'all in advance!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 30, 2012, 8:09pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/2 "2012-01-30T20:09:48Z")

</div>

Use a later version of elasticsearch (latest 0.18 is best), it has a feature called real time get where you don't need to refresh in order to get the latest indexed document (get by id).

On Monday, January 30, 2012 at 6:47 PM, Fernandojose Boiton Tello wrote:

> Hello! At work we are starting to interact with Elasticsearch we have a .Net Web application that index a document. Using MSMQ we notify our service bus an event and when processing that event. The service bus call ES to get the previous indexed document. We are having some problems because ES don't have available the document yet.
> 
> Doing some research we found the "refresh" option, but is announced as something that will impact performance. Also we saw the "flush" operation that occur each 5000 documents. Are we lost on this?
> 
> What are your recommended configurations? Any particular clue about how to set shards/replicas based on a faster document availability? Action.Write\_consistency makes any difference on this?
> 
> We are using NEST as .Net client and elasticsearch 0.16.0 is running as service in two windows server 2008 installed with elasticsearch-setup ([https://github.com/rgl/elasticsearch-setup/downloads](https://github.com/rgl/elasticsearch-setup/downloads))
> 
> Thank y'all in advance!

---

<div class="post-metadata">

**Author:** ![Fernandojose\_Boiton\_](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Fernandojose\_Boiton\_](https://discuss.elastic.co/u/Fernandojose_Boiton_)\
**Post date:** [January 30, 2012, 9:22pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/3 "2012-01-30T21:22:48Z")

</div>

Thanks!

We have to interact with a previsously installed Elasticsearch that is  
running the version 0.16. That's why we have installed that.

Is there any known issue when running different elasticsearch versions for  
a cluster?

On Mon, Jan 30, 2012 at 2:09 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Use a later version of elasticsearch (latest 0.18 is best), it has a  
> feature called real time get where you don't need to refresh in order to  
> get the latest indexed document (get by id).
> 
> On Monday, January 30, 2012 at 6:47 PM, Fernandojose Boiton Tello wrote:
> 
> Hello! At work we are starting to interact with Elasticsearch we have a  
> .Net Web application that index a document. Using MSMQ we notify our  
> service bus an event and when processing that event. The service bus call  
> ES to get the previous indexed document. We are having some problems  
> because ES don't have available the document yet.
> 
> Doing some research we found the "refresh" option, but is announced as  
> something that will impact performance. Also we saw the "flush" operation  
> that occur each 5000 documents. Are we lost on this?
> 
> What are your recommended configurations? Any particular clue about how to  
> set shards/replicas based on a faster document availability?  
> Action.Write\_consistency makes any difference on this?
> 
> We are using NEST as .Net client and elasticsearch 0.16.0 is running as  
> service in two windows server 2008 installed with elasticsearch-setup (  
> [https://github.com/rgl/elasticsearch-setup/downloads](https://github.com/rgl/elasticsearch-setup/downloads))
> 
> Thank y'all in advance!

--  
Fernandojosé Boiton  
[http://www.fboiton.com/](http://www.fboiton.com/)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 31, 2012, 3:52pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/4 "2012-01-31T15:52:13Z")

</div>

You can't run different major version nodes in the same cluster…, also, it makes little sense since the real time get will be only on part of them (if it did).

On Monday, January 30, 2012 at 11:22 PM, Fernandojose Boiton Tello wrote:

> Thanks!
> 
> We have to interact with a previsously installed Elasticsearch that is running the version 0.16. That's why we have installed that.
> 
> Is there any known issue when running different elasticsearch versions for a cluster?
> 
> On Mon, Jan 30, 2012 at 2:09 PM, Shay Banon \<[kimchy@gmail.com](mailto:kimchy@gmail.com) ([mailto:kimchy@gmail.com](mailto:kimchy@gmail.com))\> wrote:
> 
> > Use a later version of elasticsearch (latest 0.18 is best), it has a feature called real time get where you don't need to refresh in order to get the latest indexed document (get by id).
> > 
> > On Monday, January 30, 2012 at 6:47 PM, Fernandojose Boiton Tello wrote:
> > 
> > > Hello! At work we are starting to interact with Elasticsearch we have a .Net Web application that index a document. Using MSMQ we notify our service bus an event and when processing that event. The service bus call ES to get the previous indexed document. We are having some problems because ES don't have available the document yet.
> > > 
> > > Doing some research we found the "refresh" option, but is announced as something that will impact performance. Also we saw the "flush" operation that occur each 5000 documents. Are we lost on this?
> > > 
> > > What are your recommended configurations? Any particular clue about how to set shards/replicas based on a faster document availability? Action.Write\_consistency makes any difference on this?
> > > 
> > > We are using NEST as .Net client and elasticsearch 0.16.0 is running as service in two windows server 2008 installed with elasticsearch-setup ([https://github.com/rgl/elasticsearch-setup/downloads](https://github.com/rgl/elasticsearch-setup/downloads))
> > > 
> > > Thank y'all in advance!
> 
> --  
> Fernandojosé Boiton  
> [http://www.fboiton.com/](http://www.fboiton.com/)

---

<div class="post-metadata">

**Author:** ![Fernandojose\_Boiton\_](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@Fernandojose\_Boiton\_](https://discuss.elastic.co/u/Fernandojose_Boiton_)\
**Post date:** [February 1, 2012, 2:32pm UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/5 "2012-02-01T14:32:09Z")

</div>

Thanks! 🙂

On Tue, Jan 31, 2012 at 9:52 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> You can't run different major version nodes in the same cluster…, also,  
> it makes little sense since the real time get will be only on part of them  
> (if it did).
> 
> On Monday, January 30, 2012 at 11:22 PM, Fernandojose Boiton Tello wrote:
> 
> Thanks!
> 
> We have to interact with a previsously installed Elasticsearch that is  
> running the version 0.16. That's why we have installed that.
> 
> Is there any known issue when running different elasticsearch versions for  
> a cluster?
> 
> On Mon, Jan 30, 2012 at 2:09 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> Use a later version of elasticsearch (latest 0.18 is best), it has a  
> feature called real time get where you don't need to refresh in order to  
> get the latest indexed document (get by id).
> 
> On Monday, January 30, 2012 at 6:47 PM, Fernandojose Boiton Tello wrote:
> 
> Hello! At work we are starting to interact with Elasticsearch we have a  
> .Net Web application that index a document. Using MSMQ we notify our  
> service bus an event and when processing that event. The service bus call  
> ES to get the previous indexed document. We are having some problems  
> because ES don't have available the document yet.
> 
> Doing some research we found the "refresh" option, but is announced as  
> something that will impact performance. Also we saw the "flush" operation  
> that occur each 5000 documents. Are we lost on this?
> 
> What are your recommended configurations? Any particular clue about how to  
> set shards/replicas based on a faster document availability?  
> Action.Write\_consistency makes any difference on this?
> 
> We are using NEST as .Net client and elasticsearch 0.16.0 is running as  
> service in two windows server 2008 installed with elasticsearch-setup (  
> [https://github.com/rgl/elasticsearch-setup/downloads](https://github.com/rgl/elasticsearch-setup/downloads))
> 
> Thank y'all in advance!
> 
> --  
> Fernandojosé Boiton  
> [http://www.fboiton.com/](http://www.fboiton.com/)

--  
Fernandojosé Boiton  
[http://www.fboiton.com/](http://www.fboiton.com/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:40am UTC](https://discuss.elastic.co/t/get-document-by-key-faster/6541/6 "2017-07-06T03:40:49Z")

</div>


