From dev-return-8851-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Feb 25 18:01:50 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 64449 invoked from network); 25 Feb 2010 18:01:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2010 18:01:49 -0000 Received: (qmail 77487 invoked by uid 500); 25 Feb 2010 18:01:49 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 77445 invoked by uid 500); 25 Feb 2010 18:01:49 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 77437 invoked by uid 99); 25 Feb 2010 18:01:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Feb 2010 18:01:49 +0000 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Feb 2010 18:01:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D0F1429A0016 for ; Thu, 25 Feb 2010 10:01:28 -0800 (PST) Message-ID: <1833480425.529821267120888854.JavaMail.jira@brutus.apache.org> Date: Thu, 25 Feb 2010 18:01:28 +0000 (UTC) From: "Filipe Manana (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Created: (COUCHDB-673) Filtered replication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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.