elasticsearch のサンプルデモデータが登録で、@shakespeare.jsonのみが入らなった件 elasticsearch

elasticsearch のサンプルデモデータが登録で、@shakespeare.jsonのみが入らなった件

他のデータ(@accounts.json @logs.jsonl)は入ったのだが、@shakespeare.json のデータだけはいらなった
結論を先に書くと、jsonファイル内の 一部文字を削除したらうまくいった

★試してエラーだったのがこのコマンド
curl -H Content-Type: application/x-ndjson -XPOST localhost:9200/shakespeare/_bulk?pretty --data-binary @shakespeare.json

★試してエラーだったのjsonの中身
{ index :{ _index : shakespeare _id :0}}
{ type : act line_id :1 play_name : Henry IV speech_number : line_number : speaker : text_entry : ACT I }
{ index :{ _index : shakespeare _id :1}}
{ type : scene line_id :2 play_name : Henry IV speech_number : line_number : speaker : text_entry : SCENE I. London. The palace. }

★エラー内容
error : {
root_cause : [
{
type : action_request_validation_exception
reason : Validation Failed: 1: type is missing;
}
]
type : action_request_validation_exception
reason : Validation Failed: 1: type is missing;
}
status : 400


この、type is missing がでまくる

★解決策として
これをコマンド実行時に、typeも指定し、jsonファイル内部の _index : shakespeare を削除するとデータがはいった

★コマンド実行を以下に修正
curl -H Content-Type: application/x-ndjson -XPOST localhost:9200/shakespeare/_bulk?pretty --data-binary @shakespeare.json

★修正後のjsonの中身  _index : shakespeare  の箇所を一括で削除した
{ index :{ _id :0}}
{ type : act line_id :1 play_name : Henry IV speech_number : line_number : speaker : text_entry : ACT I }
{ index :{ _id :1}}
{ type : scene line_id :2 play_name : Henry IV speech_number : line_number : speaker : text_entry : SCENE I. London. The palace. }
{ index :{ _id :2}}


OK ようやくはいったよ!
★確認内容

$ curl localhost:9200/_cat/indices?v
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1331 100 1331 0 0 1039 0 0:00:01 0:00:01 --:--:-- 1064health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open logstash-2015.05.18 b8h8hhFyR6GdJD4b8uSnGg 5 1 4631 0 21.8mb 21.8mb
yellow open weight izljdv__TVi6kNjsJrKLSQ 5 1 1 0 4.5kb 4.5kb
yellow open .kibana iIYDyX9zTqGXPeZkwcGK4A 1 1 2 0 6.4kb 6.4kb
yellow open sample_service-2014.04.27 cQlQT7EZQjWXB-v9arE-iQ 5 1 28452 0 16mb 16mb
yellow open bank Ke_jUtNtQyO7UdVZUw68MQ 5 1 1000 0 482.4kb 482.4kb
yellow open logstash-2015.05.20 rViMuAJzSFSa5Cf6A0M-Cw 5 1 4750 0 21.1mb 21.1mb
green open classmethod OoavFxsjQZagx0-KcjGk_w 5 0 0 0 1.2kb 1.2kb
yellow open shakespeare DjIg60taQSO00h1JjStfXA 5 1 111395 0 22.3mb 22.3mb
yellow open logstash-2015.05.19 t_zABeHTSMa_OmDnlalW1Q 5 1 4624 0 21.5mb 21.5mb
yellow open sample_service-2014.04.28 buOpyJMJSNmKg3O_rHv0-g 5 1 26405 0 14.9mb 14.9mb