Mapper_parsing_exception :只能对某些 xcontent 字节或压缩的 xcontent 字节调用压缩器检测

5 elasticsearch

我正在使用 elasticsearch [版本 6.4.0]。我正在尝试将一个简单的客户文档索引到客户索引中。我的查询是

  curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H "Content-Type: application/json" -d'
{
  "name": "John Doe"
}
'
Run Code Online (Sandbox Code Playgroud)

{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "failed to parse"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "failed to parse",
    "caused_by" : {
      "type" : "not_x_content_exception",
      "reason" : "Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
    }
  },
  "status" : 400
}
Run Code Online (Sandbox Code Playgroud)

Chi*_*iel -1

尝试:

curl -XPOST http://localhost:9200/customer/_doc -d '{"name":"John Doe"}' -H 'Content-Type: application/json'
Run Code Online (Sandbox Code Playgroud)