バルク リクエストを ElasticSearch に設定し、ルーティング先のシャードを指定しています。
しかし、実行すると、ドキュメントが別のシャードに送信されます。
これは ElasticSArch バルクのバグですか? 単一のドキュメントにインデックスを付けるだけで機能します。検索すると動きます。しかし、一括インポートを行うときはそうではありません。
再現するには:
curl -XPOST 'http://192.168.1.115:9200/_bulk?routing=a' -d '
{ "index" : { "_index" : "articles", "_type" : "article", "_id" : "1" } }
{ "title" : "value1" }
{ "delete" : { "_index" : "articles", "_type" : "article", "_id" : "2" } }
{ "create" : { "_index" : "articles", "_type" : "article", "_id" : "3" } }
{ "title" : "value3" }
{ "update" : {"_id" : "1", "_type" : "article", "_index" : "index1"} }
{ "doc" : {"field2" : "value2"} }'