Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 65410 invoked from network); 30 Jul 2009 07:43:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jul 2009 07:43:54 -0000 Received: (qmail 31383 invoked by uid 500); 30 Jul 2009 07:43:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 31336 invoked by uid 500); 30 Jul 2009 07:43:53 -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 31326 invoked by uid 99); 30 Jul 2009 07:43:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 07:43:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of b.candler@pobox.com designates 64.74.157.62 as permitted sender) Received: from [64.74.157.62] (HELO sasl.smtp.pobox.com) (64.74.157.62) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 07:43:40 +0000 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id DDB0916424 for ; Thu, 30 Jul 2009 03:43:18 -0400 (EDT) Received: from mappit (unknown [80.45.95.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 397A616420 for ; Thu, 30 Jul 2009 03:43:16 -0400 (EDT) Received: from brian by mappit with local (Exim 4.69) (envelope-from ) id 1MWQIF-0002Su-Id for user@couchdb.apache.org; Thu, 30 Jul 2009 08:43:15 +0100 Resent-From: brian@uk.tiscali.com Resent-Date: Thu, 30 Jul 2009 08:43:15 +0100 Resent-Message-ID: <20090730074315.GB9281@uk.tiscali.com> Resent-To: user@couchdb.apache.org Received: from [127.0.0.1] (helo=mappit) by mappit with esmtp (Exim 4.69) (envelope-from ) id 1MWQ6C-0002Pa-EH for brian@localhost; Thu, 30 Jul 2009 08:30:48 +0100 Received: from pop3.linnet.org by mappit with POP3 (fetchmail-6.3.8) for (single-drop); Thu, 30 Jul 2009 08:30:48 +0100 (BST) Received: from mk-filter-6.mail.uk.tiscali.com ([212.139.137.133]) by mk-delivery-2.b2b.uk.tiscali.com with esmtp (Exim 4.69) (envelope-from ) id 1MWMdu-000GHw-JX for brian-pobox-7cad@linnet.org; Thu, 30 Jul 2009 04:49:22 +0100 Received-SPF: None identity=pra; client-ip=208.72.237.18; receiver=mk-inboundfilter-2-a-1.b2b.uk.tiscali.com; envelope-from="SRS0=3c/H=DX=gmail.com=jochenkempf@bounce2.pobox.com"; x-sender="jochenkempf@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass identity=mailfrom; client-ip=208.72.237.18; receiver=mk-inboundfilter-2-a-1.b2b.uk.tiscali.com; envelope-from="SRS0=3c/H=DX=gmail.com=jochenkempf@bounce2.pobox.com"; x-sender="SRS0=3c/H=DX=gmail.com=jochenkempf@bounce2.pobox.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass identity=helo; client-ip=208.72.237.18; receiver=mk-inboundfilter-2-a-1.b2b.uk.tiscali.com; envelope-from="SRS0=3c/H=DX=gmail.com=jochenkempf@bounce2.pobox.com"; x-sender="postmaster@sepia.pobox.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-Trace: 1224313572/mk-filter-6.mail.uk.tiscali.com/ListenerSBRS/$ACCEPTED/UNKNOWNLIST/208.72.237.18/5.3/SRS0=3c/H=DX=gmail.com=jochenkempf@bounce2.pobox.com X-SBRS: 5.3 Received: from sepia.pobox.com ([208.72.237.18]) by mk-inboundfilter-2-a-1.b2b.uk.tiscali.com with ESMTP; 30 Jul 2009 04:49:22 +0100 Received: from sepia.pobox.com (localhost [127.0.0.1]) by sepia.pobox.com (Postfix) with ESMTP id 9E22A40B3DE for ; Wed, 29 Jul 2009 23:49:19 -0400 (EDT) X-Pobox-Delivery-ID: F5F893F6-7CBB-11DE-B5D6-F54483A8CF02-28021239!sepia.pobox.com x-pobox-client-address: 209.85.217.205 x-pobox-client-name: mail-gx0-f205.google.com Received: from mail-gx0-f205.google.com (mail-gx0-f205.google.com [209.85.217.205]) by sepia.pobox.com (Postfix) with ESMTP id 3A0EF40B3A9 for ; Wed, 29 Jul 2009 23:49:19 -0400 (EDT) Received: by mail-gx0-f205.google.com with SMTP id 1so2302008gxk.17 for ; Wed, 29 Jul 2009 20:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=lNra6IleHmg8sytObT9/IAr+TEFgl+8t961ivWbYK2E=; b=avMliLp+3MpV+XE1suhdo4vPWKwKguJCiC8i8GY7l4UD4qZh6GiS+Id/f0U++8MmC5 VEOqL1l0D7DNurRAIiccBrLaQ/UXFjnqtVr7X1ZBQsmqLGZvzeje5SGOtTlEgDJUwVwL pghXs4BuKsi2yf2Y8L73d/mMpmqMq7eEcMiBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=QCMQfXeFCsu0bD4tSwSu6cHjpxzcG/aYVOf1Dgp6I4rp6UZvhiAEgo6L+7ptCeHzH7 zSlDpgtn8qawYBqSobi5oMxYU2uvmZT99+7Q4v3BE8hzAGX6RNM4YGy+bWwPwn/V6KZa cW9zJUvwl3LJ2T0Iz/szbaMLA+jUYmdE3yld4= MIME-Version: 1.0 Received: by 10.90.86.10 with SMTP id j10mr493642agb.2.1248925759096; Wed, 29 Jul 2009 20:49:19 -0700 (PDT) In-Reply-To: <20090729093554.GC10984@uk.tiscali.com> References: <6d692b470907271733o3edca47aj4b4664fb0abeb559@mail.gmail.com> <20090729093554.GC10984@uk.tiscali.com> From: Jochen Kempf Date: Wed, 29 Jul 2009 23:48:59 -0400 Message-ID: <6d692b470907292048v11b96ea4hdac0d0e5afc525b6@mail.gmail.com> Subject: Re: Problems with reduce in view appear when record size > 6 To: Brian Candler Content-Type: multipart/alternative; boundary=0016362835ea38c6b9046fe430e3 X-Pobox-Pass: jochenkempf@gmail.com is whitelisted Resent-Date: Thu, 30 Jul 2009 08:43:15 +0100 X-Pobox-Relay-ID: A613FED6-7CDC-11DE-806B-AEF1826986A2-28021239!a-pb-sasl-sd.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org --0016362835ea38c6b9046fe430e3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Brian, guessing that you refer to this page incremental mapthe corresponding reduce function would be as follows, right (the final reduce result is slightly changed, being a hash now)? I am asking as I am still not absolutely firm with that topic... map => " function(doc) { emit(doc["_id"], [doc["_id"], doc["_rev"], doc["var1"], doc["var2"], doc["var3"], doc["var4"], doc["var5"]]); } " reduce => " function(key, values, combine) { var result = {ids:[], revs:[], variables:[]} if (combine) { for (i in values) { result.ids.push(values[i].ids); result.revs.push(values[i].revs); result.variables.push(values[i].variables); } } else { for (i in values) { result.ids.push(values[i][0]); result.revs.push(values[i][1]); result.variables.push([values[i][2], values[i][3], values[i][4], values[i][5], values[i][6]]); } } return result; } " > > Yes, one of ids, revs or variables is undefined :-) > > You can use 'log' to see what values are being passed into your reduce > function. > > As a guess, I'd say that a re-reduce operation is taking place: 'combine' > will be true, 'key' will be null, and 'values' will be the output of a > previous reduce operation. > > That is: your reduce function must be written in such a way as to be able > to > process values generated by a previous reduce function, as well as values > emitted by a document. The Wiki talks about this further. > --0016362835ea38c6b9046fe430e3--