couchdb-user mailing list archives

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

as an example I chose the replication filter function from
http://wiki.apache.org/couchdb/Replication#Filtered_Replication
> 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
db.
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?


Thanks,
Mitja


Mime
View raw message