incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitja Kleider <>
Subject Replication filter ignoring deleted docs or changed values
Date Sat, 09 Jul 2011 22:08:16 GMT

as an example I chose the replication filter function from
> function(doc, req) {
>   if (doc.type && doc.type == "foo") {
>     return true;
>   } else {
>     return false;
>   }
> }

After replicating to another db, change a document containing type="foo" to type="bar" and
replicate again.
Because the filter function returns false, the document remains unchanged in the replicated
The same happens when deleting the document containing type="foo". The filter function returns
false on the deleted document, the deletion is not replicated.

I would like to achieve a different behavior:
If the filter function returns false, but the document was replicated previously, it should
be deleted.

Any ideas how to solve this?


View raw message