按照官网的示例 导入数据 三个json格式数据文件 shakespeare.json, accounts.json, logs.jsonl
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl
网上搜索没有找到解决方式
"error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
"status" : 406
es6出了同样的问题,你解决了吗(ES5.X上是可以的)
curl -H "Content-Type: application/json;charset=UTF-8" -X POST 'localhost:9200/ebay_message_sku/external?pretty' -d '{"sku":"IA00012SI","id":"1427265999227808888"}'
加上这个 -H "Content-Type: application/json;charset=UTF-8"
curl -XPUT -H 'Content-Type: application/json'