Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api doesn't support versioning #3111

Closed
bleskes opened this Issue May 29, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@bleskes
Copy link
Member

commented May 29, 2013

To reproduce

curl -XPOST http://localhost:9200/test/test/1 -d'{
    "field": "value1"
}'

The internal version is now 1.

Now index again:

curl -XPOST http://localhost:9200/test/test/1 -d'{
    "field": "value2"
}'

Internal version is now 2.

Try to update using version=1 (should fail)

curl -XPOST "http://localhost:9200/test/test/1/_update?version=1" -d'{
    "doc": { "field": "value3" }
}'

Which doesn't fail with a version conflict but returns:

{"ok":true,"_index":"test","_type":"test","_id":"1","_version":3,"_previous_version":2}

PS. The java api's UpdateRequestBuilder doesn't have a setVersion method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.