Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_bulk response for delete operations lack the `found` field #3320

Closed
ofavre opened this Issue Jul 12, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@ofavre
Copy link
Contributor

commented Jul 12, 2013

When deleting a document the classical way, we get the found field, telling us whether the document was already deleted or not:

$ curl -XDELETE 'localhost:9200/index/type/1'
{"ok":true,"found":true,"_index":"index","_type":"type","_id":"1","_version":2}
# `found` is true

$ curl -XDELETE 'localhost:9200/index/type/1'
{"ok":true,"found":false,"_index":"index","_type":"type","_id":"1","_version":3}
# `found` is now false

When using the _bulk api, we get the same answer, except for the missing found field:

$ curl -XDELETE 'localhost:9200/index/type/1' -d "$(echo -e '{"delete":{"_id":"1"}}\n ')"
{"took":1,"items":[{"delete":{"_index":"index","_type":"type","_id":"1","_version":1,"ok":true}}]}
# `found` is missing

$ curl -XDELETE 'localhost:9200/index/type/1' -d "$(echo -e '{"delete":{"_id":"1"}}\n ')"
{"took":1,"items":[{"delete":{"_index":"index","_type":"type","_id":"1","_version":2,"ok":true}}]}
# `found` is missing

@martijnvg martijnvg closed this in b116097 Jul 15, 2013

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.