incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Is the doc object optimized when _deleted is true?
Date Wed, 19 Dec 2012 15:47:58 GMT
It depends how you deleted the doc. if you used the http DELETE
method, then the document only has _id, _rev and _deleted properties.

If you updated the document, preserving content, and added the
_deleted:true property, then all your other properties are still
there.


On 19 December 2012 15:23, Pulkit Singhal <pulkitsinghal@gmail.com> wrote:
> I was recently having trouble with deleted documents not being replicated
> and it seems that my filter was lacking:
>
>> if (doc._deleted) {
>>     return true;
>> }
>>
>
> I suppose that when _deleted is true, CouchDB might not pass the rest of
> the properties that are usually attached to a doc?
>
> Otherwise the rest of my filter (even without _deleted check) really should
> have been able to return true:
>
>> if (doc.owner && doc.owner=<blah logic>) {
>>     return true;
>> }
>>
>
> Thoughts?

Mime
View raw message