Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 53791 invoked from network); 2 Dec 2010 19:28:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 19:28:41 -0000 Received: (qmail 40564 invoked by uid 500); 2 Dec 2010 19:28:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 40499 invoked by uid 500); 2 Dec 2010 19:28:39 -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 40491 invoked by uid 99); 2 Dec 2010 19:28:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 19:28:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.216.52 as permitted sender) Received: from [209.85.216.52] (HELO mail-qw0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 19:28:31 +0000 Received: by qwe4 with SMTP id 4so3019236qwe.11 for ; Thu, 02 Dec 2010 11:28:10 -0800 (PST) Received: by 10.224.45.206 with SMTP id g14mr335941qaf.235.1291318089904; Thu, 02 Dec 2010 11:28:09 -0800 (PST) Received: from [10.1.10.164] (c-66-31-20-188.hsd1.ma.comcast.net [66.31.20.188]) by mx.google.com with ESMTPS id nb14sm583214qcb.36.2010.12.02.11.28.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Dec 2010 11:28:07 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: Map/Reduce Question From: Adam Kocoloski In-Reply-To: Date: Thu, 2 Dec 2010 14:28:06 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1082) On Dec 2, 2010, at 10:19 AM, Matthew Woodward wrote: > On Thu, Dec 2, 2010 at 3:46 AM, Robert Newson = wrote: >=20 >> The simplest means to dedupe this is; >>=20 >> function(keys, values, rereduce) { >> return values[0]; >> } >>=20 >>=20 > Thanks! I'm sure I'm missing something, but I stuck this in as my = reduce > function and I'm only getting one result back total. Do I do some sort = of > for/each loop in there to get unique values for each key? >=20 > Also this doesn't include the key in what's returned (key comes back = null) > and I'd like to have that in there. I haven't messed with that piece = of > things at all so I'll see if I can get that sorted out. You need to perform the query with ?group=3Dtrue. Best, Adam