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 C09D884C4 for ; Tue, 30 Aug 2011 06:25:23 +0000 (UTC) Received: (qmail 52188 invoked by uid 500); 30 Aug 2011 06:25:22 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 51031 invoked by uid 500); 30 Aug 2011 06:25:00 -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 51005 invoked by uid 99); 30 Aug 2011 06:24:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 06:24:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [121.101.151.210] (HELO nm2-vm0.bullet.mail.in.yahoo.com) (121.101.151.210) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 30 Aug 2011 06:24:45 +0000 Received: from [121.101.151.236] by nm2.bullet.mail.in.yahoo.com with NNFMP; 30 Aug 2011 06:24:25 -0000 Received: from [121.101.151.235] by tm1.bullet.mail.in.yahoo.com with NNFMP; 30 Aug 2011 06:26:12 -0000 Received: from [127.0.0.1] by omp1004.mail.in.yahoo.com with NNFMP; 30 Aug 2011 06:24:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 152898.43466.bm@omp1004.mail.in.yahoo.com Received: (qmail 49832 invoked by uid 60001); 30 Aug 2011 06:17:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314685063; bh=kDUeyGKn+rES7Oa7UTleLE9+t6uQyhRE2kIfYiC+CC0=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=esGdRRJ6TIuqvf1DV07NT+8dZCSTMXkN2Sz67lVHauicPzYu8Bh6q0RduIQQ+Sj/WNj4tkdxPOaA9MwP6FHqxTL8PLb/sixRoXCWLxgW2lMhbT2RjbyWQcS74SHtE2ADsAFqw0CX5NlSrBgdfY+7oje+sdJzkhpprjr4UTeCb1w= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=0VryyxK82IVYmLziqSq4b9h8ICQw9qr9QborC6PjpI9WIjCsN+xnRFQC029xYzw8wgp9hU+JJjbdBZlr/euHJL00kmbsXaWEmrlsGHGWs0MRjbGiTNNTbjHeJDED28vqKXB82DRycISLfEGWNer+LrOTajCLvBoxLWMtn1kmiv0=; X-YMail-OSG: .iqmvo0VM1nRZTqEYiwZtQQtP0r3J5ftB2SaHPbKAGjhd.u sFSmWOHIdcqMU8A6UtPj12vSifC5Ba5P4tVB1tFoI4wNWCkwALGKJpWbjhBj 4a.HE_B80v6yBxP6S2zIR2vxwcq.GJjZpKsYyRcLaI4uxKjn708uR_uD4VbR vNktoEsagPbxrfslxy1GZz8rITuNBJ820Ib7COXys.cHli7Aa3xooIGW.MnO Oe2msEyPhG6NrrdJhzmytVTYXnd7LcR2CCSv7oQhs0SF9zwUnKFMmH_DAaD4 9ZXisHLfi0aZQ0yKCbuFFXYjnRaX.yL2tflmW9rX7l8UlZjtSMCVjtQ1ahVe F90XOgE22GyCrTglgAw00jMGsOdsvewq_t3tn8RChlv7r3CLB3HqvONxPAg2 n3BZHNLxU2awzBzpYnekJUTv6XZPy0lpsgkyaUYcrEn5pqpfvpaLvng-- Received: from [203.83.248.32] by web94712.mail.in2.yahoo.com via HTTP; Tue, 30 Aug 2011 11:47:43 IST X-Mailer: YahooMailWebService/0.8.113.315625 Message-ID: <1314685063.18104.YahooMailNeo@web94712.mail.in2.yahoo.com> Date: Tue, 30 Aug 2011 11:47:43 +0530 (IST) From: Kiran Lonikar Reply-To: Kiran Lonikar Subject: Getting map results in key --> array of values format To: user couchdb MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1439567003-1314685063=:18104" --0-1439567003-1314685063=:18104 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AI just started using couchdb. I have the following question:=0ACur= rently the results of map are returned in the following format:=0A=0A{=0A"t= otal_rows": 3,=0A"offset": 0,=0A"rows": [=0A{=0A"key": "key1",=0A"id": "doc= -id1",=0A"value": "value1"=0A},=0A=0A{=0A"key": "key1",=0A"id": "doc-id2",= =0A"value": "value2"=0A},=0A=0A{=0A"key": "key2",=0A"id": "doc-id3",=0A"val= ue": "value3"=0A}=0A]=0A}=0A=0AIs it possible to condense the same "key" ro= ws and get the results in the format below:=0A=0A{=0A"rows": [=0A{=0A"key":= "key1",=0A"value": ["value1", value2]=0A},=0A=0A{=0A"key": "key2",=0A"valu= e": "[value3]"=0A}=0A]=0A}=0A=0AI think I will have to use a list function = to format the view results since there are no view parameters to do this an= d also since I do not want to use the reduce function.=0A=0AThe list functi= on is complicated by the fact that if I use limit and startkey parameters o= f the view, it is likely that limit may chop off some values for the last k= ey and those values will not appear in the list output.=0A=0AInstead, I wou= ld like to know if there is any option where couchdb view retrieval itself = can be changed to retrieve the output in the way I want.=0A=0AThanks,=0AKir= an --0-1439567003-1314685063=:18104--