バルク API を使用して以下を投稿しようとしています。私はES 2.2.0を持っています
{"index":{"_index":"junktest","_type":"test"}}
{"DocumentID":"555662","Tags":["B","C","D"],"Summary":"Summary Text","Status":"Review","Location":"HDFS","Error":"None","Author":"Abc Mnb","Sector":"Energy","Created Date":"2013-05-23"},
{"DocumentID":"555663","Tags":["A","B","C"],"Summary":"Summary Text","Status":"Review","Location":"HDFS","Error":"None","Author":"Abc Mnb","Sector":"Energy","Created Date":"2013-04-25"}
なので
curl -XPOST "http://localhost:9200/_bulk" --data-binary @post.json
しかし、私は得る
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Malformed
action/metadata line [3], expected START_OBJECT or END_OBJECT but found [VALUE_
STRING]"}],"type":"illegal_argument_exception","reason":"Malformed action/metadata line [3], expected START_OBJECT or END_OBJECT but found [VALUE_STRING]"},"status":400}
なぜ},
無効なのですか?コンマなしで試してみましたが、,
!がなくてもエラーが発生します。
構文の何が問題になっていますか?
編集
私はそれを動作させることができました
{"index":{"_index":"junktest","_type":"test"}}
{"DocumentID":"555662","Tags":["B","C","D"],"Summary":"Summary Text","Status":"Review","Location":"HDFS","Error":"None","Author":"Abc Mnb","Sector":"Energy","Created Date":"2013-05-23"}
{"index":{"_index":"junktest","_type":"test"}}
{"DocumentID":"555663","Tags":["A","B","C"],"Summary":"Summary Text","Status":"Review","Location":"HDFS","Error":"None","Author":"Abc Mnb","Sector":"Energy","Created Date":"2013-04-25"}
これは、一括 API を使用して複数のレコードをインデックス化する唯一の方法ですか?