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
Closed

_bulk response for delete operations lack the found field #3320

ofavre opened this issue Jul 12, 2013 · 0 comments

Comments

@ofavre
Copy link
Contributor

ofavre 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant