couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <>
Subject [jira] Created: (COUCHDB-673) Filtered replication
Date Thu, 25 Feb 2010 18:01:28 GMT
Filtered replication

                 Key: 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".


         "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

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.

View raw message