I have strange bulk index results with 0.18.5.
Let me explain step by step.
- The followings are my bulk file.
$ cat bulktest3
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "user" : "aaa" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "2", "user" : "bbb" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "3", "user" : "ccc" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "4", "user" : "ddd" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "5", "user" : "xxx" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "6", "user" : "yyy" } }
{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "7", "user" : "zzz" } }
- I indexed using the following curl command.
$ curl -XPUT 'http://localhost:9200/_bulk/' --data-binary @bulktest3
{"took":622,"items":[{"index":{"_index":"twitter","_type":"tweet","_id":"1","_version":1,"ok":true}},{"index":{"_index":"twitter","_type":"tweet","_id":"3","_version":1,"ok":true}},{"index":{"_index":"twitter","_type":"tweet","_id":"5","_version":1,"ok":true}},{"index":{"_index":"twitter","_type":"tweet","_id":"7","error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=0): []]"}}]}
- Unfortunately, I got several errors. Only 3 out of 7 rows are indexed.
$ curl -XGET 'http://localhost:9200/twitter/_search?pretty=true&q=*'
{
"took" : 12,
"timed_out" : false,
"_shards" : {
"total" : 20,
"successful" : 20,
"failed" : 0
},
"hits" : {
"total" : 3,
"max_score" : 1.0,
"hits" : [ {
"_index" : "twitter",
"_type" : "tweet",
"_id" : "1",
"_score" : 1.0, "_source" : { "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "2", "user" : "bbb" } }
}, {
"_index" : "twitter",
"_type" : "tweet",
"_id" : "3",
"_score" : 1.0, "_source" : { "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "4", "user" : "ddd" } }
}, {
"_index" : "twitter",
"_type" : "tweet",
"_id" : "5",
"_score" : 1.0, "_source" : { "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "6", "user" : "yyy" } }
} ]
}
I have tested with other files either though, STRANGELY, even rows(2, 4, 6...) got indexed always.
Is this a bug or am I wrong?
Thanks in advance.