我正在使用 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)
| 归档时间: |
|
| 查看次数: |
11120 次 |
| 最近记录: |