简体   繁体   English

Elasticsearch批量数据插入

[英]Elasticsearch bulk data insertion

In my node app i am using Elasticsearch as my backend process. 在我的节点应用程序中,我正在使用Elasticsearch作为后端流程。 I am trying to insert data from a json file but I got an error. 我正在尝试从json文件插入数据,但出现错误。

My json: 我的json:

{"index":{"_index":"mfissample", "_type":"place_mfi", "_id": "1"}}
{"PAR" : 42.31,"Center":"xx","District":"yy","Country" : "vv","GLP" : 13073826.63,"State" : "zz","SSScore" :null, "location":"80.102134,12.897401"}
{"index":{"_index":"mfissample", "_type":"place_mfi", "_id": "2"}}
{"PAR" : 42.31,"Center" : "xx","District" : "yy","Country" : "zz","GLP" : 13073826.63,"State" : "vv","SSScore" :null,
"location":"80.102134,12.897401"}

My command: 我的命令:

curl -XPOST 'http://localhost:9200/_bulk' --data-binary @jsonbulk.json

The error: 错误:

{"error":"JsonParseException[Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@792c4b55; line: 1, column: 12]]","status":500}

"SSScore" :null,"location":"80.102134,12.897401"之前删除\\n

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM