From dev-return-3698-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Tue Mar 31 04:18:06 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 93686 invoked from network); 31 Mar 2009 04:18:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2009 04:18:06 -0000 Received: (qmail 12287 invoked by uid 500); 31 Mar 2009 04:18:06 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 12201 invoked by uid 500); 31 Mar 2009 04:18:06 -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 12191 invoked by uid 99); 31 Mar 2009 04:18:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 04:18:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jchris@gmail.com designates 209.85.219.166 as permitted sender) Received: from [209.85.219.166] (HELO mail-ew0-f166.google.com) (209.85.219.166) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 04:17:56 +0000 Received: by ewy10 with SMTP id 10so2719008ewy.11 for ; Mon, 30 Mar 2009 21:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=+gOpRYbsgPJrGmj29JawY/hxjmudS0vLNKya/RvRWqw=; b=EC5wBIqNYdCfRxcyA2i+8DRIXRVcdpwJyV7VdlLM+sZl1oXAQtfh8b07Mbq31KL+rq t7hrqaD+ift+/ZiOPjJc9olkS4AICAJ/cqm0xtdQz95eA9p2j03AD46TRaxiTdxhVnYP IcqztcDf8W/kFu+SiBWyMlD95j2MxVmVhBYEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=JqelqMkSLqwGKpDRtzRrWTDMJ+B+rIJPi662X44alLip7PYuKLsKBfAnKrZ9Nw1tKE g2sMN5cZt9s59qdyhF8DLhoxXxAhzXOwXhD9a6+QYqrFEzKrkzSPDN5VJ1gUGlkUYsM3 2FnnAuKXMBuax0HQPbIg9QT45cDf/Yg5qguWU= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.210.91.7 with SMTP id o7mr3185371ebb.39.1238473055660; Mon, 30 Mar 2009 21:17:35 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 Mar 2009 21:17:35 -0700 X-Google-Sender-Auth: d128c38605124c60 Message-ID: Subject: Re: Multi-Step Map/Reduce? From: Chris Anderson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Mar 30, 2009 at 9:07 PM, Chris Anderson wrote: > On Mon, Mar 30, 2009 at 8:50 PM, Zachary Zolton > wrote: >> @jchris is that similar to what you meant? >> > > Pretty much. Go for it! The difference between those two is that mine (group_level reduce mirrored to a new db) allows you to do stuff that spans multiple document depending on key range. Just adding a transform to replication would only give you one doc at a time. I implemented group=true reduce to another db in Ruby here: http://github.com/jchris/couchrest/blob/master/lib/couchrest/helper/pager.rb > >> On Mon, Mar 30, 2009 at 10:49 PM, Zachary Zolton >> wrote: >>> I've been thinking, if there was just a reasonable way to replicate >>> another database with the output of a view, then you could just write >>> regular one-pass map/reduce views on the "derived" database. >>> >>> That would seem to cause fewer ripples across the codebase. >>> >>> On Mon, Mar 30, 2009 at 10:40 PM, Chris Anderson wrote: >>>> On Mon, Mar 30, 2009 at 6:48 PM, Zachary Zolton >>>> wrote: >>>>> Devs, >>>>> >>>>> Has there been any discussion of using multiple rounds of map/reduce >>>>> for CouchDB views? >>>>> >>>>> If were possible, and the view could be indexed within acceptable >>>>> bounds of memory and processing time, I could see using it situations >>>>> where the current one-pass solution proves difficult or requires >>>>> multiple queries. >>>> >>>> I think the simplest way to add value would be to make a way to bounce >>>> a group_level reduce query to documents in another database. Then you >>>> could use views to sort them by value etc. >>>> >>>>> >>>>> Also, I tend to be daft, so I'd appreciate hearing if this idea is >>>>> silly or simply outside of the scope of CouchDB! >>>>> >>>> >>>> >>>> I think it sounds great. >>>> >>>> Chris >>>> >>>> -- >>>> Chris Anderson >>>> http://jchrisa.net >>>> http://couch.io >>>> >>> >> > > > > -- > Chris Anderson > http://jchrisa.net > http://couch.io > -- Chris Anderson http://jchrisa.net http://couch.io