Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 9382 invoked from network); 16 May 2009 02:24:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 May 2009 02:24:05 -0000 Received: (qmail 17715 invoked by uid 500); 16 May 2009 02:24:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17630 invoked by uid 500); 16 May 2009 02:24:04 -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 17620 invoked by uid 99); 16 May 2009 02:24:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 May 2009 02:24:04 +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 boermans@gmail.com designates 209.85.217.170 as permitted sender) Received: from [209.85.217.170] (HELO mail-gx0-f170.google.com) (209.85.217.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 May 2009 02:23:53 +0000 Received: by gxk18 with SMTP id 18so4314191gxk.11 for ; Fri, 15 May 2009 19:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=m9B5aT8uf2qtkpyM7r262EvUQUJQKXFJ4hH/Qmh+3HI=; b=eL4+7giCi62EQ646o7CKaCiFxivaFO0V89+wr41Ayq4kqkCDHJLUAerDKrg0sWmqnE PrUYTYlkYrzIWEn3ZPycPdmghvGx8wuvJx5d0dHEjLOBMY8sOrIxUINa+xupGAmY+Bmx /xooSDz6B8Mf4P8U6StzLQ/UCr/ii8DqdL05c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=pEuTcBNUimGIE/gBI8rRIVqdqp6snaSIk4GoPQdIWJ662lXvkTtA0KZX1zEuIf7V/l YsI7Tgo/M16FnXL7Kj5b38Oq2U4hcn5MNOL+FpJmzmKhCUj7auB56VHdE0WQg8g0OfgG h6S8XFgiaSHcrxyBKWM9KBMRKzooJbuOMEwPk= MIME-Version: 1.0 Received: by 10.100.215.13 with SMTP id n13mr4949396ang.88.1242440612470; Fri, 15 May 2009 19:23:32 -0700 (PDT) Date: Sat, 16 May 2009 11:53:32 +0930 Message-ID: Subject: A reduce with multiple totals From: Oliver Boermans To: user@couchdb.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi CouchCrew. Hoping you guys can help me with my first reduce composition problem. My app is intended to log phone calls. Now I want to output some tallies. For each logged call I am emitting two items: one each for the call answered and the call=92s intended recipient. I want a tally of calls answered and calls for with the phone answerer/recipient as the key. Please take a look at the code here: http://www.friendpaste.com/64pGMIf7OoAOkSvRew8AOB The results are null instead of my intended total. What am I doing wrong in my reduce function? My approach feels good up until reduce. Please correct me if there is a better angle to this problem. I=92m spoilt by Firebug as a tool for troubleshooting this kind of code in a browser. I=92d be very interested to hear what approach you might use to nut out what is going wrong when composing something like this in Futon. Many thanks Ollie