Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 40052 invoked from network); 17 Dec 2009 15:25:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 15:25:37 -0000 Received: (qmail 39513 invoked by uid 500); 17 Dec 2009 15:25:35 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 39436 invoked by uid 500); 17 Dec 2009 15:25: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 39426 invoked by uid 99); 17 Dec 2009 15:25:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 15:25:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rajkumars@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 15:25:26 +0000 Received: by pwi19 with SMTP id 19so1501383pwi.35 for ; Thu, 17 Dec 2009 07:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=DLCEMcuSaCnoXH6G8tXwsTE16AHPmRVC2M44P9Ckwy8=; b=d8bBIROHfnAK2AfkNq8Nk6PBF3xF89mKGlwCuBBSCBHL6H/cmxJl+l/t1AmSnzOaCh jgQSChp12NG1Obk0FEeQhoQyCpMgklRxEw72IQN9w4P6vuosa3q5OXoU/4TPj1hiCdzq 4d8/Z+QYl2G/3X4ILu5gsQn/tfV8DCVXMBQxU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=rrb6PEO7HvIsqikybRcIvmP4QqoevvE3dPxRw/gJKUWcpxeYm81N8ZgXa8g8C2fGXL ftxSuBHHDGdKzfsKOIBgbB1n2ujkU9ctiSkTrzXVvpxATBjf9N/aIJzXqvuUdQ3OrPFm ppND2amdevLqzDxdCF8MtWWQDezEb8fobwAHc= MIME-Version: 1.0 Received: by 10.142.4.17 with SMTP id 17mr1756237wfd.85.1261063505685; Thu, 17 Dec 2009 07:25:05 -0800 (PST) Date: Thu, 17 Dec 2009 20:55:05 +0530 Message-ID: <64de5c8b0912170725k1f4c1c77m30b8dec90fdc36f1@mail.gmail.com> Subject: map from multiple docs From: Rajkumar S To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have a db which stores mail logs. Each log entry is stored as a single document. for example (just the relevant fields): { "_id": "2b93d795d483b1ca352f6596c5497c7f", "_rev": "1-1463054967", "queueid": "03DBB81E1F", "numrecipients": 1, "fromemail": "officefile631@yahoo.com", "logtype": "message_from" } { "_id": "5ade1602d52f75a4b35ab6c03aa5d8d9", "_rev": "1-2573414463", "queueid": "03DBB81E1F", "rcptemail": "joe@swinepro.info", "logtype": "message_delivery", } I want to get the queueid of all mails sent from yahoo.com domain to swinepro.info domain. If all entries with same queueid was in the same doc I can write a map with key like ["yahoo.com","swinepro.info"] so that in my url I just use startkey as ["yahoo.com","swinepro.info"] to get all mails from "yahoo.com" to "swinepro.info. Here my problem is that sender and recipient are in two different docs, with queueid being the common key. Given this data structure is there any way I can get the data out in the way I want? Any help will be very much appreciated. regards, raj