# Version check on update?

**URL:** https://discuss.elastic.co/t/version-check-on-update/11953
**Category:** Elasticsearch
**Created:** [May 14, 2013, 11:47am UTC](https://discuss.elastic.co/t/version-check-on-update/11953 "2013-05-14T11:47:05Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![Chris2048](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris2048/32/2322_2.png) [@Chris2048](https://discuss.elastic.co/u/Chris2048)
#### Post date: [May 20, 2013, 10:22pm UTC](https://discuss.elastic.co/t/version-check-on-update/11953/14 "2013-05-20T22:22:48Z")

</div>

Ah, so this is what you mean by idempotent changes - I wanted to prevent  
updates when another user had already made a change to that document (to  
ensure this change was preserved somehow), but I guess this isn't supported?

Thanks for your help.

On 20 May 2013 12:24, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com) wrote:

> Chris - you don't need to specify a version. Elasticsearch retrieves the  
> current document, applies your update and reindexes the document, checking  
> that the version hasn't been incremented in the meantime. If it has been  
> incremented, then it retries the process retry\_on\_conflict times (which  
> defaults to 0) and either ends up succeeding, or returning a conflict error  
> to you.
> 
> You said:
> 
> > I don't already have the document, but I know what fields I want to  
> > change, and what to change them to - I want to leave all others fields  
> > alone.
> 
> Right - that's exactly what the update api does.
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/M49krcDGPHc/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/M49krcDGPHc/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, 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).

---

_[View the full topic](https://discuss.elastic.co/t/version-check-on-update/11953)._
