couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: DELETE vs. _deleted:true
Date Mon, 01 Jul 2013 18:29:29 GMT
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

So, "yes" to both things.


On 1 July 2013 19:21, Stephen Bartell <> 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,

View raw message