Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.11
-
None
-
None
-
trunk / 0.11
Description
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" :
}
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.
Attachments
Attachments
Issue Links
- is depended upon by
-
COUCHDB-64 Enable selective replication
- Closed