I apologize. I was not clear.
There is a feature of CouchDB called update_notifications that allows
an external process, supervised by Erlang, to be sent information
about document updates.
Unfortunately, this feature is not well documented, but you can see a
couple examples[1][2].
It's not elegant, but it might work for you depending on how complex
your use case is. You can use whatever language and HTTP client
library you like to issue the appropriate commands.
You could also write a daemon that consumes the ?changes feed.
You might load all the _design documents at the beginning. When the
design document is updated, compare the filter functions to see if
they've changed. You could fetch all the documents one by one or in
chunks and run them through the old filter and the new filter and see
which ones should no longer be replicated and issue a DELETE.
In short, there's no particularly efficient way to handle "correcting"
a changed replication filter. But you can work around it if you're
really determined.
[1] http://wiki.apache.org/couchdb/Regenerating_views_on_update?highlight=(update\_notification)
[2] http://github.com/tilgovi/couchdb-lounge/raw/master/replicator/replication_notifier.py