# Setting the \_version value using the Java (actually any) API?

**URL:** <https://discuss.elastic.co/t/setting-the--version-value-using-the-java-actually-any-api/5093>\
**Category:** Elasticsearch\
**Created:** [August 9, 2011, 4:17am UTC](https://discuss.elastic.co/t/setting-the--version-value-using-the-java-actually-any-api/5093 "2011-08-09T04:17:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_smith/32/1323_2.png) [@Paul\_Smith](https://discuss.elastic.co/u/Paul_Smith)\
**Post date:** [August 9, 2011, 4:17am UTC](https://discuss.elastic.co/t/setting-the--version-value-using-the-java-actually-any-api/5093/1 "2011-08-09T04:17:36Z")

</div>

I'm sure I'm in a my-one-year-old-is-sick-and-so-Ican't-sleep daze, but I  
cannot for the life of my find the right way to configure a put mapping to  
expose the fact that I have (or have not) set the \_version field to be  
'external' as is defined here:

[http://www.elasticsearch.org/guide/reference/api/index\_.html](http://www.elasticsearch.org/guide/reference/api/index_.html) (Versioning  
section)

I don't know exactly where I'm supposed to set "version\_type" to be  
"external".

Help ?

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_smith/32/1323_2.png) [@Paul\_Smith](https://discuss.elastic.co/u/Paul_Smith)\
**Post date:** [August 9, 2011, 4:36am UTC](https://discuss.elastic.co/t/setting-the--version-value-using-the-java-actually-any-api/5093/2 "2011-08-09T04:36:47Z")

</div>

paul =\> LAME. 60 seconds after I post this I see the  
setVersion/VersionType on the IndexRequestBuilder.. I was looking in the  
nested setSource area...

_sigh_ sorry!

On 9 August 2011 14:17, Paul Smith [tallpsmith@gmail.com](mailto:tallpsmith@gmail.com) wrote:

> I'm sure I'm in a my-one-year-old-is-sick-and-so-Ican't-sleep daze, but I  
> cannot for the life of my find the right way to configure a put mapping to  
> expose the fact that I have (or have not) set the \_version field to be  
> 'external' as is defined here:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_.html) (Versioning  
> section)
> 
> I don't know exactly where I'm supposed to set "version\_type" to be  
> "external".
> 
> Help ?
> 
> Paul

---

<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:57am UTC](https://discuss.elastic.co/t/setting-the--version-value-using-the-java-actually-any-api/5093/3 "2017-07-06T03:57:51Z")

</div>


