Elasticsearch - “错误”:“找不到 uri 的处理程序

问题描述 投票:0回答:1

我是 Elasticsearch 新手。一切似乎都工作正常,但是当我运行下面的 json 代码时。它给出错误:“错误”:“找不到 uri [/vehicles/car/01?pretty=&pretty=true] 和方法 [PUT] 的处理程序”

PUT /vehicles/car/01?pretty
{
  "make": "Lexus",
  "color": "Black",
  "HP": 300
}

我已将 Elasticsearch 和 kebana 提取到“下载”文件夹中。通过终端安装了 Brew 和 JAVA JDK。

elasticsearch nosql
1个回答
0
投票

您必须使用非常旧的文档,因为 映射类型已在 8.0 中删除,因此 URL 中的

car
URI 部分是导致问题的原因。只需使用
_doc
而不是
car
就可以了。

           change this
              ||||
              vvvv
PUT /vehicles/_doc/01?pretty
{
  "make": "Lexus",
  "color": "Black",
  "HP": 300
}
© www.soinside.com 2019 - 2024. All rights reserved.