我有一个json文件,我想将json文件加载到弹性搜索中,所以我做了,
curl -XPOST 'http://localhost:9200/datas/data/1' -d @rosia_data.json
但它会产生som错误:
{"error":"MapperParsingException[Malformed content, must start withno bject]","status":400}
我的数据是这样的:
[
{
"sr":"Krishna Chaudhary",
"inventory":"Vector Plus - 2`S",
"packaing_unit":"pcs",
"shopname":"D&b Store",
"shoproute":"RCT Market",
"quantity":12,
"order_id":21745,
"distributor_name":"New Horizon Distributors Itahari",
"distributor_id":13,
"order_date":"2014-06-01"
},
{
"sr":"Krishna Chaudhary",
"inventory":"Vector Plus - 4`S",
"packaing_unit":"pcs",
"shopname":"D&b Store",
"shoproute":"RCT Market",
"quantity":12,
"order_id":21746,
"distributor_name":"New Horizon Distributors Itahari",
"distributor_id":13,
"order_date":"2014-06-01"
},
{
"sr":"Khagendra Pokhrel",
"inventory":"Vector Plus - 4`S",
"packaing_unit":"pcs",
"shopname":"Samita Cosmetic",
"shoproute":"Pathri",
"quantity":12,
"order_id":21762,
"distributor_name":"Horizon Distributors Damak",
"distributor_id":14,
"order_date":"2014-06-01"
}
]
所以请帮我解决这个问题。 顺便说一下,我是Elasticsearch的新手。