From couchdb-user-return-1246-apmail-incubator-couchdb-user-archive=incubator.apache.org@incubator.apache.org Thu Sep 11 05:08:52 2008 Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 13111 invoked from network); 11 Sep 2008 05:08:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 05:08:52 -0000 Received: (qmail 84518 invoked by uid 500); 11 Sep 2008 05:08:48 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 84478 invoked by uid 500); 11 Sep 2008 05:08:48 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 84467 invoked by uid 99); 11 Sep 2008 05:08:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 22:08:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 05:07:49 +0000 Received: by py-out-1112.google.com with SMTP id u52so165837pyb.13 for ; Wed, 10 Sep 2008 22:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=VQsAJaGRM3IdBRH1KW1PibjO58lCc4o0tmm60xa/G7A=; b=jpM/xPFw+FaIn5mIx2mF+qf4pigJph5OFQNTwh431LNamVm8BBwgdDh0/sloSMj4zF WAwvvxPwhRqlDZkKpHut3kzin3dnkp4NqqnBZYfgcMw9jSJ1QvODhyA+CtPPBzl1b9ho vu5MGRTbSfRVkPEp9p+KrKqRFfxjLpKy3ejho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Af4R2FIDUbp1bVeHvU3YM8iRyw5VX7cACd2rJ6XEQMErnT9YFd+NJ0a9PpJ/PBLG9e ryE6lqUCVIp9bdV0t1E9hHQU9oGBULjjYnksSmnLa+Qbfrf6/L1cjlxDXEPaM9yqaFp9 RLXMra/xOvzMuFZAwHaYClfT1ZqyB1Yk4kYbo= Received: by 10.143.31.4 with SMTP id i4mr772803wfj.87.1221109699411; Wed, 10 Sep 2008 22:08:19 -0700 (PDT) Received: by 10.142.49.15 with HTTP; Wed, 10 Sep 2008 22:08:19 -0700 (PDT) Message-ID: Date: Wed, 10 Sep 2008 22:08:19 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: view access keeps timing out In-Reply-To: <928bdd8e0809101925q1f5963ccsca8e0425a9b289eb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <928bdd8e0809101925q1f5963ccsca8e0425a9b289eb@mail.gmail.com> X-Google-Sender-Auth: 9b8d4bcefbfac5bf X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Sep 10, 2008 at 7:25 PM, william kinney wrote: > reduce function: > function(keys, values) { > return values; > } > The problem is with your reduce function (and the existing documentation for reduce, which should make this clear, but doesn't). Reduce should only be used to emit scalar values. In your case, you would be better not to define a reduce function at all, and just query the map with startkey and endkey ranges. For example reduce functions, see couch_tests.js's reduce test here: http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch_tests.js There are also some examples in various blog posts I've written about reduce: Google search for those posts: http://tinyurl.com/couchdb-reduce Hope this helps! Chris -- Chris Anderson http://jchris.mfdz.com