go - 找不到 uri [<index>/_doc/<document_id>/_update] 和方法 [POST] 的处理程序

标签 go elasticsearch

目前,我正在使用客户端 go-elasticsearch 版本 v7.8.0 和 elastic 版本 8.1.2。 Elastic Search 已从版本 7.x

更新

现在,当我尝试更新文档时,它失败并出现以下错误。

我在 stackoverflow 上找到了一些类似的答案,但没有帮助

api_platform produces Error "no handler found for uri [/index/_doc/_search] and method [POST]"

elasticsearch response on failure while updating- {"error":"no handler found for uri [/<index>/_doc/<doc_id>/_update?retry_on_conflict=2] and method [POST]"

更新查询示例:

{"doc":{"info":{"description":"test description","slug":"test"}}}

最佳答案

请尝试改用端点 /{index}/_update/{id}。您使用的那个已在 8.1 中弃用并删除。

引用:

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html#docs-update-api-request

关于go - 找不到 uri [<index>/_doc/<document_id>/_update] 和方法 [POST] 的处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71812420/

相关文章:

google-app-engine - 批量查询分页?是否可以从数据存储中批量获取并获取游标?

go - 将数据库连接存储在全局变量中

ElasticSearch 嵌套查询 - 排除父文档

elasticsearch - 如何覆盖来自 logstash 中的 json 的时间戳字段

python - ElasticSearch建议者全文搜索

ruby-on-rails - Rails:无法映射类型:完成(Gem:elasticsearch-model)

go - 我可以防止 amqp.Channel 因错误而关闭吗?

git - 去巴泽尔 : Using external Git repositories

golang mutex 有时有效?

php - 搜索引擎