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 D9ED1908A for ; Mon, 11 Jun 2012 10:29:55 +0000 (UTC) Received: (qmail 37751 invoked by uid 500); 11 Jun 2012 10:29:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 37616 invoked by uid 500); 11 Jun 2012 10:29:54 -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 37595 invoked by uid 99); 11 Jun 2012 10:29:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 10:29:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 10:29:45 +0000 Received: by wgbfg15 with SMTP id fg15so2552850wgb.23 for ; Mon, 11 Jun 2012 03:29:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:message-id:subject:x-mailer:mime-version:content-type :x-gm-message-state; bh=vRCLq7Rs29YfiTTKMdcwo3N3hXJ5aYGSf4SG+EqNQ94=; b=nswiG9dfu76kWUJCyUkDYCLESQqaYzIN0iPMCamhRQxD2QJGbPxra+kW4C54Wu1pA2 ADfHbYtA51rxqCsTzdcDkKKGmErWNSHEAlYTXPL6/9ksU/hVtk0K6buolo3snormZPlF CwA5XdVosvZidnUrKxoxCi8/iPpujFOQjc6rq2g567BPDvlsRDrBY6rfnJvCLv4nwDbB fHukDCfQQOj/iQt5NQQoFtL9EeKh9gxVUiIUpPT0XhePQCMGnDvKJuS2NXDFztsYSbrJ irmzb22iER0e5nFPtHqHOnVrXBoRzP0/d9uYR0lZ8SylH6R7ClU9OmPRMy+YDybDv+8J UGxw== Received: by 10.216.218.220 with SMTP id k70mr6023638wep.165.1339410561826; Mon, 11 Jun 2012 03:29:21 -0700 (PDT) Received: from [10.10.10.57] (office.chillibean.net. [193.203.81.66]) by mx.google.com with ESMTPS id gc6sm23198546wib.0.2012.06.11.03.29.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jun 2012 03:29:21 -0700 (PDT) Date: Mon, 11 Jun 2012 11:29:19 +0100 From: Rory Franklin To: user@couchdb.apache.org Message-ID: Subject: Reducing/Grouping an array X-Mailer: sparrow 1.6.1 (build 1081.52) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4fd5c87f_3dc240fb_11ba6" X-Gm-Message-State: ALoCoQnXivchMU5hHWhTmid7TLGsWZDSK+OSEGFxMxMkkfbnbHjbGDdXDAmxYtJNl3QFvtI43RyG X-Virus-Checked: Checked by ClamAV on apache.org --4fd5c87f_3dc240fb_11ba6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Is it possible to have a view that emits out something like the following: ("key1", [1,1,0,1]) ("key1", [1,1,1,0]) ("key1", [1,0,0,0]) ("key2", [0,1,0,0]) which can be grouped to the following: "key1", [3,2,1,1] "key2", [0,1,0,0] Or would this calculation have to be made in the application layer? Thanks, Rory --4fd5c87f_3dc240fb_11ba6--