大きなJSONドキュメントをElasticsearch 5.1にインポートしようとしています。データの小さな部分は、次のようになります。CURLを使用してJSONをElasticsearch 5.1にインポートする
[
{
"id": 1,
"region": "ca-central-1",
"eventName": "CreateRole",
"eventTime": "2016-02-04T03:41:19.000Z",
"userName": "[email protected]"
},
{
"id": 2,
"region": "ca-central-1",
"eventName": "AddRoleToInstanceProfile",
"eventTime": "2016-02-04T03:41:19.000Z",
"userName": "[email protected]"
},
{
"id": 3,
"region": "ca-central-1",
"eventName": "CreateInstanceProfile",
"eventTime": "2016-02-04T03:41:19.000Z",
"userName": "[email protected]"
},
{
"id": 4,
"region": "ca-central-1",
"eventName": "AttachGroupPolicy",
"eventTime": "2016-02-04T01:42:36.000Z",
"userName": "[email protected]"
},
{
"id": 5,
"region": "ca-central-1",
"eventName": "AttachGroupPolicy",
"eventTime": "2016-02-04T01:39:20.000Z",
"userName": "[email protected]"
}
]
私は、可能な場合は、ソースデータに変更を加えることなく、データをインポートしたいと思いますので、私は_bulkコマンドアウトルールは私が必要だろうとと信じて各エントリの詳細を追加します。
私はいくつかの方法を試しましたが、運がなかった。このドキュメントをそのままインポートしようと時間を無駄にしていますか?
私が試してみた:
curl -XPOST 'demo.ap-southeast-2.es.amazonaws.com/rea/test' --data-binary @Records.json
をしかし、それはエラーで失敗します。
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}},"status":400}
ありがとう!
返信いただきありがとうございます。私はこれらのオプションを試し、報告して戻します! –