Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 90144 invoked from network); 13 Nov 2010 15:47:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Nov 2010 15:47:16 -0000 Received: (qmail 99861 invoked by uid 500); 13 Nov 2010 15:47:47 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 99683 invoked by uid 500); 13 Nov 2010 15:47:45 -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 99668 invoked by uid 99); 13 Nov 2010 15:47:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Nov 2010 15:47:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-iw0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Nov 2010 15:47:39 +0000 Received: by iwn37 with SMTP id 37so4809894iwn.11 for ; Sat, 13 Nov 2010 07:47:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=jYIVF2cQ6TGUPUc3RHVJk6lPT0nIFKbYEO1aqkXsLLA=; b=Zj3s5GGtaDWElVRJ7JPl/1WPd9/YZD2syVYIuNGJqo0umFw5Hc29FzCyG2ILw/+fLC fw8M4zgu7dAS7zkpG7x2Ws52df5H+4coEumEh3vj4HL9w6+3rVdOJ5DLXC7dJjEtHJcG 6yebVcLOvJZ+5nbkO1c8qRIJvuhh8/h1qDSfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SiEZEP/9XP4a10ATm1G6y/dyb5MIe2vyc6pMisjf9/dRL7qCKV2EvBS1mZl70n+J2z MRIdKc/h3pQk7Hlncgrj2OAyvbBhDAyjLkAsAB+4TEaoQmB1s+xV0SgUOdYk0NgpjhmA eOb4nbD8fZpQ6vT4IZso9zUXm0rdpSp3d5QWI= MIME-Version: 1.0 Received: by 10.231.39.133 with SMTP id g5mr2994443ibe.161.1289663239265; Sat, 13 Nov 2010 07:47:19 -0800 (PST) Received: by 10.231.8.146 with HTTP; Sat, 13 Nov 2010 07:47:19 -0800 (PST) In-Reply-To: References: Date: Sat, 13 Nov 2010 16:47:19 +0100 Message-ID: Subject: Re: builting changes filter functions From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, Nov 13, 2010 at 4:38 PM, Benoit Chesneau wrot= e: > Hi all, > > So since our last discussion i've rewrite builtin filter fonction to > get changes according some docids. It now works on GET and POST by > passing _docids as flter name. Then you could pass json encoded list > of docid as a doc_ids query argument or a doc_id member of a json > object in the body: > > POST /test_suite_db/_changes?feed=3Dcontinuous&timeout=3D500&since=3D7&fi= lter=3D_docids > {"doc_ids":["something","anotherthing","andmore"]} > > or > > GET http://127.0.0.1:5984/test_suite_db/_changes?filter=3D_docids&doc_ids= =3D[%22something%22,%22anotherthing%22,%22andmore%22] > > I've also added another builtin to get changes if a design document is > created or changed named "_design" . And maybe we could also add a > "_regexp" builtin filter ? > > Diff is here : > > https://github.com/benoitc/couchdb/commit/dbf5b0181f10bf36927d4b44a2f3a98= e07c60b44 > > > OK for commit it ? > > > - beno=EEt > updated ptch to reuse code: https://github.com/benoitc/couchdb/compare/master...native_filter