开发工具 - Elasticsearch Uri 的不正确 HTTP 方法

Dev Tools - Elasticsearch Incorrect HTTP method for Uri

我有 ElasticSearch Kibana v7.12,当我在管理选项卡 -> 开发工具中打开 localhost:5601 时。我正在尝试 运行 post 方法,但每当我尝试执行该方法时,它都会告诉我不正确的 HTTP 方法,我不明白为什么我在 [=18] 中包含 /_doc =]. GET 方法工作得很好。我对此很陌生,所以任何建议将不胜感激!

从 7.x 开始,每当您索引文档时都需要在 URL 中包含 _doc。这仅用于表示端点名称。

来自官方elasticsearch documentation

in 7.0, _doc is a permanent part of the path and represents the endpoint name rather than the document type.

From 8.0 Specifying types in requests is no longer supported.