一个简单的elasticsearch问题?

curl POST http://localhost:9200/customer/_doc/1?pretty -H "Content-Type:application/json" -d '{"name":"John Doe"}'
curl: (6) Could not resolve host: POST
{
"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
}
很简单的输入不知道为什么报错,还请大神能解决

第1个回答  2020-04-16
curl -XPOST .........

格式不对
第2个回答  2022-05-07
windows git bash 下面输入试试
相似回答