Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CD676CF0 for ; Mon, 16 May 2011 17:40:29 +0000 (UTC) Received: (qmail 88700 invoked by uid 500); 16 May 2011 17:40:27 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 88618 invoked by uid 500); 16 May 2011 17:40:27 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 88610 invoked by uid 99); 16 May 2011 17:40:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 17:40:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kxepal@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 17:40:21 +0000 Received: by vws16 with SMTP id 16so5021000vws.11 for ; Mon, 16 May 2011 10:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=hv6iDy3JYYz+g0TduUmvLAWDIDH8PcWacmtf0LcUC68=; b=MkkyIHYBPynUK3FgQEfBl/2veYh+pOxZbgbcVc2JOKrDYZgOtBTUrZSN6/gS9uUDnS qktZ9Yt8R2JCyJih2Wi0VYCRsNYomvFCU+/tKejOjWJVaFvQvf5ZyIcxyqX4Lb5KFhmW G+X5oEzug4+4jwGRb1peE1x++X1xU/bMZn0n4= 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; b=dvMCE6lefiCzCKmtqFMVTzhwprstBlOr+ZDbin/hMmbr2K4QmVKbK4TUGK0mPKjT6T 8ZwMge+hg+li+cHFbzoWaaRLia6VFb62G0KwhRYyki14D/oLRmaTHoGyIVQaNhr7pFvU ZYHQjgLcGoYK/1dZa+cu6OLg7eG0KqnaCYIb4= MIME-Version: 1.0 Received: by 10.52.67.105 with SMTP id m9mr6818920vdt.126.1305567600303; Mon, 16 May 2011 10:40:00 -0700 (PDT) Received: by 10.220.188.8 with HTTP; Mon, 16 May 2011 10:40:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 May 2011 21:40:00 +0400 Message-ID: Subject: Re: Passing _changes feed through a map function? From: Alexander Shorin To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org No, you couldn't change returned document via filter_view. It just works as regular filter, but it generates "passed" state for documents that have been emitted by view map function at least once. You probably wanted of some kind real-time view result stream? Filter_view call doesn't update view index if I understood Jan right, so you still have to make pure view function call to make result being indexed and accessible. About other new filter I know nothing, may be Jan or somebody other could tell more. However, it doesn't present in query server now or I've missed something interesting(: ------------------ ,,,^..^,,, On Mon, May 16, 2011 at 7:42 PM, Joe Freeman wrote: > On 16 April 2011 16:42, Alexander Shorin wrote: >> On Sat, Apr 16, 2011 at 7:26 PM, Joe Freeman wrote: >>> Is there a way to pass the _changes feed (with include_docs=true) >>> through a map function (for example, one that exists as part of an >>> existing view)? If not, are there any plans for this? >> >> This functionality is already in trunk/1.1.x branch >> https://github.com/apache/couchdb/commit/56086f07c425bd272bda5a6609ed9db3758178ba > > Sorry to bring up an old thread, but having had a second look at that > commit, I'm not sure it's really what I'm after. > > The feature I'm after involves being able to have a _changes feed with > include_docs=true which also gives me the ability to pass each > document through a map function first so that I can remove unnecessary > (and potentially big) parts of the document. At the moment I have to > listen to _changes, and then for each change, I do another HTTP > request to find out what the change involved - I was hoping to skip > out this extra request. > > Perhaps I'm mis-understanding that commit and it does actually do what > I want? Or maybe I'm after the 'other' mechanism that Jan mentioned? > > Thanks. >