Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E6BF310780 for ; Tue, 30 Jul 2013 15:49:37 +0000 (UTC) Received: (qmail 90634 invoked by uid 500); 30 Jul 2013 15:49:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 90309 invoked by uid 500); 30 Jul 2013 15:49:35 -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 90297 invoked by uid 99); 30 Jul 2013 15:49:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 15:49:34 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hknight555@gmail.com designates 209.85.219.51 as permitted sender) Received: from [209.85.219.51] (HELO mail-oa0-f51.google.com) (209.85.219.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 15:49:28 +0000 Received: by mail-oa0-f51.google.com with SMTP id h2so4366886oag.10 for ; Tue, 30 Jul 2013 08:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tO5B2UocsSMnomv5kcEKK5s8v/UrVMp1UdUErYD13IU=; b=x3za/ZrHu4Bir5enapzfnPCUNahxfQVcjQ/6Vmv9R0MkG+7ZBT952dLul0Syk5KLGi fh+GpaFw+pr7NTARq3+44YRwNCS10Dbcf0mtgSzGNZvpoUGcfQQ+d2D+kpYX0H/OpWnv RZFwDvCmEJwBXgYCnzqxATKiHhDmPJsIsOZY7uE6inaswAWMCBoJG8B09qKNDCz7M1tS 7FREKeOXuYWO26GOYDHIvEGSYC48H9ofxo3yrlyhUppFqXFrtOpqJEa6hB5GSjHiQZFx ESfd43ttTTTvAzazJ0Rgxetqw2pwuZ+A05TT8uCM8C0N6tTtyy8osPQfEoOk+5ywpfyj wk1g== MIME-Version: 1.0 X-Received: by 10.182.158.36 with SMTP id wr4mr56777439obb.60.1375199347770; Tue, 30 Jul 2013 08:49:07 -0700 (PDT) Received: by 10.76.138.4 with HTTP; Tue, 30 Jul 2013 08:49:07 -0700 (PDT) Date: Tue, 30 Jul 2013 12:49:07 -0300 Message-ID: Subject: CouchDB: Display 3 rows with the highest value From: Hank Knight To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org This returns 3 rows: https://zurv3aqzm.iriscouch.com/fruit/_design/zzz6/_view/zzz6?limit=3&group=true I want to display the 3 rows with the highest value, not any arbitrary 3 rows. Here is my code: /// Map Function /// function(doc) { if (doc.fruit) emit(doc.fruit, null); } /// Reduce Function /// _count /// Grouping: True ///