You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Chris Anderson (JIRA)" <ji...@apache.org> on 2010/02/26 02:15:28 UTC

[jira] Closed: (COUCHDB-673) Filtered replication

     [ https://issues.apache.org/jira/browse/COUCHDB-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Anderson closed COUCHDB-673.
----------------------------------

    Resolution: Fixed

committed in r916518

Thanks Filipe!

> Filtered replication
> --------------------
>
>                 Key: COUCHDB-673
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-673
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Replication
>    Affects Versions: 0.11
>         Environment: trunk / 0.11
>            Reporter: Filipe Manana
>         Attachments: filtered-replication.patch
>
>
> The following patch adds support for filtered replication.
> A replication object can now have 2 more optional fields: "filter" and "query_params".
> Example:
> {
>          "source" : "sourceDB",
>          "target" : "targetDB",
>          "filter" : "mydesign/myfilter",
>          "query_params" : {
>               "param1" : "value",
>               "param2" : int_value
>               // etc...
>          }    
> }
> The filter must exist in the source DB, and it's the same type of filter as used by the _changes handler.  The parameter "query_params" is used for adding fields to the req.query object passed as the second parameter to the filter function (like the query string parameters passed to _changes).
> The patch also does a refactoring of the _changes handler, allowing that code be used not only as an HTTP API but also as an internal API. The replicator now uses this internal API, allowing us to avoid copy-pasting code and have all the features of _changes available to the replicator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.