# Update with refresh flag not immediately refreshing

**URL:** <https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400>\
**Category:** Elasticsearch\
**Created:** [August 29, 2013, 9:27pm UTC](https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400 "2013-08-29T21:27:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Bellora](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_bellora/32/74372_2.png) [@Paul\_Bellora](https://discuss.elastic.co/u/Paul_Bellora)\
**Post date:** [August 29, 2013, 9:27pm UTC](https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400/1 "2013-08-29T21:27:34Z")

</div>

My application has a list of objects that are sorted by a timestampModifiedfield, descending - the results of this page are driven by ES queries.  
These objects can be edited, and after saving an object it is expected to  
appear at the top of the results. Because of this, I'm sending refresh=trueon the corresponding  
update request. However, in some environments, the object is not updated in  
time for page reload, and remains in the same spot.

Reading the update[http://www.elasticsearch.org/guide/reference/api/update/](http://www.elasticsearch.org/guide/reference/api/update/) documentation,  
it says:

refresh: Refresh the index immediately after the operation occurs, so that

> the updated document appears in search results immediately.

Does this guarantee the refresh has happened by the time the update  
response is received? Or is it possible there is still a slight delay  
happening here?

--  
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:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [August 30, 2013, 8:09am UTC](https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400/2 "2013-08-30T08:09:29Z")

</div>

Hi Paul,

On Thu, Aug 29, 2013 at 11:27 PM, Paul Bellora [bellorap@gmail.com](mailto:bellorap@gmail.com) wrote:

> My application has a list of objects that are sorted by a  
> timestampModified field, descending - the results of this page are driven  
> by ES queries. These objects can be edited, and after saving an object it  
> is expected to appear at the top of the results. Because of this, I'm  
> sending refresh=true on the corresponding update request. However, in  
> some environments, the object is not updated in time for page reload, and  
> remains in the same spot.
> 
> Reading the update[http://www.elasticsearch.org/guide/reference/api/update/](http://www.elasticsearch.org/guide/reference/api/update/) documentation,  
> it says:
> 
> refresh: Refresh the index immediately after the operation occurs, so
> 
> > that the updated document appears in search results immediately.
> 
> Does this guarantee the refresh has happened by the time the update  
> response is received? Or is it possible there is still a slight delay  
> happening here?

There shouldn't be any delay, how easily can you reproduce the issue?

--  
Adrien Grand

--  
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:** ![Paul\_Bellora](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_bellora/32/74372_2.png) [@Paul\_Bellora](https://discuss.elastic.co/u/Paul_Bellora)\
**Post date:** [September 4, 2013, 9:39pm UTC](https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400/3 "2013-09-04T21:39:06Z")

</div>

This was due to a mistake that was made deploying to my test environment -  
ES was behaving correctly. Sorry for the noise.

On Friday, August 30, 2013 4:09:29 AM UTC-4, Adrien Grand wrote:

> Hi Paul,
> 
> On Thu, Aug 29, 2013 at 11:27 PM, Paul Bellora \<[bell...@gmail.com](mailto:bell...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > My application has a list of objects that are sorted by a  
> > timestampModified field, descending - the results of this page are  
> > driven by ES queries. These objects can be edited, and after saving an  
> > object it is expected to appear at the top of the results. Because of this,  
> > I'm sending refresh=true on the corresponding update request. However,  
> > in some environments, the object is not updated in time for page reload,  
> > and remains in the same spot.
> > 
> > Reading the update[http://www.elasticsearch.org/guide/reference/api/update/](http://www.elasticsearch.org/guide/reference/api/update/) documentation,  
> > it says:
> > 
> > refresh: Refresh the index immediately after the operation occurs, so
> > 
> > > that the updated document appears in search results immediately.
> > 
> > Does this guarantee the refresh has happened by the time the update  
> > response is received? Or is it possible there is still a slight delay  
> > happening here?
> 
> There shouldn't be any delay, how easily can you reproduce the issue?
> 
> --  
> Adrien Grand

--  
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:18am UTC](https://discuss.elastic.co/t/update-with-refresh-flag-not-immediately-refreshing/13400/4 "2017-07-06T02:18:08Z")

</div>


