Hi guys,
this the first time I get in touch with the bulk API in order to bulk delete
documents and I am a bit confused about it:
First, the CouchDB response seems to be not helpful:
CouchDB always returns with a "conflict" for all scenarios except "ok".
So I wonder how to handle the results properly when something fails.
This behaviour is already described within issue 1408 [1].
Second, it seems to me that CouchDB internally creates "tombstone" documents
when passing not-existing documents for deletion. I am not totally sure about
this, but as always CouchDB response with a "conflict" for such a case but
searching with the key returns a the document which contains {deleted: true}.
For a document that doesn't exist before and shouldn't be there.
I have to admit that I tested this by using nano and didn't checked the
"native" way yet.
So I wonder how you guys are using the bulk API?
Maybe this behaviour makes sense and I just don't understand it the right way?
Or is there something wrong with the bulk delete implementation and we e.g.
have to do an existance check before using a bulk delete?
I am really looking forward for some help!
Many thanks in advance!
Olaf
[1] https://github.com/apache/couchdb/issues/1408