A document is deleted if and only if its top-level _deleted property
is true. The document can contain many fields, even attachments, and
still be deleted. A deleted document behaves differently (404 if you
GET it, no _rev needed to create a document where a deleted document
is, etc).

The DELETE verb is just API sugar for PUT
{"_id":"idhere","_rev":"rev_you_passed","_deleted":true}

So, "yes" to both things.

B.


On 1 July 2013 19:21, Stephen Bartell <[email protected]> wrote:
> Quick question on deleting.
>
> Are the following assumptions correct:
>
> 1. If i use the DELETE verb, a delete handler is invoked in which the 
> following operations will render the doc deleted:
>         a) All data except `_id`, and `_rev` is stripped from the doc
>         b) a field `_deleted` is set to true.
>
> 2. If I take a doc and create the `_deleted` field and set it to true myself, 
> then the doc is deleted; even though all data except _id and _rev are still 
> present.
>
> Thanks,

Reply via email to