[
https://issues.apache.org/jira/browse/COUCHDB-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838447#action_12838447
]
Filipe Manana commented on COUCHDB-673:
---------------------------------------
Forgot to mention: JS explicit tests added and all of the existing JS and Etap
tests pass.
cheers
> 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.