What is the response code when a document is updated?
AFAIK, the response code should be 200 for document update and 201 for creation.
So, for something like :
PUT index/type/doc?version=1
// body
if update is successful, then 200 should be returned, else 409 for version conflict.
(This assumes that the document already exists before the PUT is sent)
in my code i have
while(true)
response = try_update()
if (response.code == 200):
break
this should result in only one update (otherwise it will get 409 response code). But, the update happened twice and response code was 200 only once.
How is this possible?