英文:
no handler found for uri [<index>/_doc/<document_id>/_update] and method [POST]
问题
目前,我正在使用客户端go-elasticsearch版本v7.8.0
和版本为8.1.2
的Elasticsearch。Elasticsearch已从版本7.x
升级。
现在,当我尝试更新文档时,出现以下错误。
我找到了一些类似于这个的stackoverflow答案,但没有帮助。
更新失败时Elasticsearch的响应- {"error":"no handler found for uri [/<index>/_doc/<doc_id>/_update?retry_on_conflict=2] and method [POST]"
更新的示例查询:
{"doc":{"info":{"description":"测试描述","slug":"test"}}}
英文:
Currently, i am using client go-elasticsearch version v7.8.0
and elastic of version 8.1.2
. the elastic search got updated from version 7.x
Now when I try to update the document it fails with the following error.
There are some stackoverflow answer i came through like this one but didn't help
elasticsearch response on failure while updating- {"error":"no handler found for uri [/<index>/_doc/<doc_id>/_update?retry_on_conflict=2] and method [POST]"
Sample query for update:
{"doc":{"info":{"description":"test description","slug":"test"}}}
答案1
得分: 1
您不能使用Go客户端7.8.0与Elasticsearch服务器8.1.2,它们不兼容。您需要将Go客户端升级到相同的8.1版本。
英文:
You cannot use a Go client for 7.8.0 with and Elasticsearch server 8.1.2, they are not compatible. You need to upgrade your Go client to the same 8.1 version
答案2
得分: 1
请尝试使用/{index}/_update/{id}
端点替代。您使用的那个已被弃用,并在8.1版本中移除。
参考链接:
英文:
Please try use the endpoint /{index}/_update/{id}
instead. The one you used is deprecated and removed in 8.1.
Reference:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论