elastic/elasticsearch
在 GitHub 查看Missing ID for an update/delete operation causes the entire bulk to fail
Open
#10,428 创建于 2015年4月4日
:Distributed/CRUD>bugTeam:Distributedhelp wanted
仓库指标
- Star
- (76,700 star)
- PR 合并指标
- (平均合并 2天) (30 天内合并 1,000 个 PR)
描述
If one of the actions from a bulk requires an ID (update/delete) but doesn't have it, the entire bulk fails. For example:
$ cat /tmp/test_bulk
{"index":{}}
{"name":"test doc"}
{"delete":{}}
$ curl -XPOST localhost:9200/test/test/_bulk?pretty --data-binary @/tmp/test_bulk
{
"error" : "ActionRequestValidationException[Validation Failed: 1: id is missing;]",
"status" : 400
}
I would expect the index operation to succeed and the delete/update operation to fail. Or maybe there's a good reason for failing the whole bulk that I don't see?