curl -H 'Content-Type: application/x-ndjson' -s -XPOST 10.0.3.73:9200/yyzj2019-04/trans/_bulk?pretty --data-binary @../test_6000.txt
報錯json
1 { 2 "error" : { 3 "root_cause" : [ { 4 "type" : "parse_exception", 5 "reason" : "Failed to derive xcontent" 6 } ], 7 "type" : "parse_exception", 8 "reason" : "Failed to derive xcontent" 9 }, 10 "status" : 400 11 }
可能緣由:app
1.仔細檢查,命令中的ip、port、還有@後面的文件名路徑curl
2.檢查數據文件txt的編碼格式,要使用utf-8編碼
3。。。url
後續再補充spa