Why do you need to specify version=4? Versioning is used internally by
_update and your request should work as intended without explicitly
specifying version.
On Monday, November 4, 2013 9:24:32 PM UTC+1, joa wrote:
I want to use the versioning feature but I recognized, that the _update
endpoint is not working with the version paramter:
I don't see any issue at first glance, what you are doing makes perfectly
and is supported by the update api. Then only version 4 of the document
will be updated, otherwise you'll get back an error by default.
What are you seeing instead?
On Tuesday, November 5, 2013 11:25:41 AM UTC+1, joa wrote:
I think I need to pass the version parameter to check if the users request
was based on an outdated document?
Maybe I understood the versioning wrong.
In my index I have a doc (id 123) with a current version of for example 9.
What I thought is, that when I am trying to do an update with:
ES would raise an conflict error, cause I am trying to do an update on an
"old document (version 4)" and the document in the index is already at
version 9. Is this how versioning works?
Maybe I understood the versioning wrong.
In my index I have a doc (id 123) with a current version of for example 9.
What I thought is, that when I am trying to do an update with:
ES would raise an conflict error, cause I am trying to do an update on an
"old document (version 4)" and the document in the index is already at
version 9. Is this how versioning works?
Hey,
you're right, we added support for version in the update api only to
master, which means the coming 1.0: Update api doesn't support versioning · Issue #3111 · elastic/elasticsearch · GitHub .
We didn't backport to 0.90 the fix because it would have broken backwards
compatibility.
Sorry for the misunderstanding, I'd suggest you to get the document and
apply the changes yourself for now (till 1.0 gets released).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.