No failures in one action affect others.
From the documentation for elasticsearch bulk api:
JSON . .
elasticsearch status , , ,
:
client.bulk({
body: [
{ index: { _index: 'test', _type: 'test', _id: 1 } },
{ title: 'foo' },
{ update: { _index: 'test', _type: 'test', _id: 332 } },
{ doc: { title: 'foo' } },
{ delete: { _index: 'test', _type: 'test', _id: 33 } },
]
}, function (err, resp) {
if(resp.errors) {
console.log(JSON.stringify(resp, null, '\t'));
}
});
:
{
"took": 13,
"errors": true,
"items": [
{
"index": {
"_index": "test",
"_type": "test",
"_id": "1",
"_version": 20,
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"status": 200
}
},
{
"update": {
"_index": "test",
"_type": "test",
"_id": "332",
"status": 404,
"error": {
"type": "document_missing_exception",
"reason": "[test][332]: document missing",
"shard": "-1",
"index": "test"
}
}
},
{
"delete": {
"_index": "test",
"_type": "test",
"_id": "33",
"_version": 2,
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"status": 404,
"found": false
}
}
]
}