当我尝试使用更新API更新文档时,出现以下错误
{"error":"RemoteTransportExceptiones-node9][inet[/10.130.89.220:9300[indices:data/write/update]]; nested: VersionConflictEngineExceptionnewsentiments][3] [relevancy][abc@gmail.com]: version conflict, current [71], provided [70; ","status":409}
是什么导致上述错误,我该如何解决?
最佳答案
发送请求时,您指定要更新的文档版本?就像是:
curl -XPUT 'localhost:9200/myIndex/MyType/1?version=70' -d '{
"content" : "here is my update"
}'
问题是有人(或您)已经更新了版本70,所以现在的版本是71。
要解决您的问题,只需不要在请求中传递版本:
curl -XPUT 'localhost:9200/myIndex/MyType/1' -d '{
"content" : "here is my update"
}'
关于elasticsearch - 在Elasticsearch中更新问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35129858/