Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 94436 invoked from network); 24 Nov 2008 22:23:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2008 22:23:04 -0000 Received: (qmail 19524 invoked by uid 500); 24 Nov 2008 22:23:13 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 19486 invoked by uid 500); 24 Nov 2008 22:23:13 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 19475 invoked by uid 99); 24 Nov 2008 22:23:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 14:23:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 74.125.46.154 as permitted sender) Received: from [74.125.46.154] (HELO yw-out-1718.google.com) (74.125.46.154) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 22:21:46 +0000 Received: by yw-out-1718.google.com with SMTP id 5so987573ywr.0 for ; Mon, 24 Nov 2008 14:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=BPRGHIfGp53ka0XOQWd4gjzQRAqIVpy7yrEfHYTMyu4=; b=fva3aUpENDNkCL9eTo9Qy5z+dZGE4NiGbvEkhAxp8NibBce17Wr8CWjEHZBqXCTj1e Ju+rK3W3b8E+v+ck6K0bs1fFOd9/ZmCCYKIUIM7vRrviXpqfee2eGkDkNI05izPB6tY7 ok12/hN3D07H2kLHLm/dASYliPQ3sYzWSIR4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Kwx98S5bsu+oJNMdi/1oQnUVc0gbaEhw3HSBnDN1+tqBY8+xxAlb8QDjFy6bsH4L/s x7uNCeb1Qbc2cm11wPr/WOk6csKRy8PUCPJDCyJ3pmNkLJ26c3X3ao8LjOueUj8vv0p0 09nHBdEU5NRP6HAKQvFVzf2TsdDhDe97Wykrw= Received: by 10.65.96.17 with SMTP id y17mr3929772qbl.2.1227565351648; Mon, 24 Nov 2008 14:22:31 -0800 (PST) Received: by 10.64.148.13 with HTTP; Mon, 24 Nov 2008 14:22:31 -0800 (PST) Message-ID: Date: Mon, 24 Nov 2008 14:22:31 -0800 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: threaded email view In-Reply-To: <492A505E.5050104@silencegreys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <492A505E.5050104@silencegreys.com> X-Google-Sender-Auth: 91f5b998c62dd599 X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Nov 23, 2008 at 10:57 PM, Jedediah Smith wrote: > I'm using CouchDB to store and process emails. > > Every email has a "message-id" header field containing a globally unique > identifier and zero or more "references" and "in-reply-to" fields, each of > which contains the message-id of a different message. You might have the easiest time providing this view if you can have an original-message-for-thread-id that is attached to all messages that are replies or references to another message. That way you can pull out an entire thread by finding all messages that reference the thread-originating message in the parent field(s). The method you describe (where each message links only to its immediate parent) leaves you no common identifier for an entire thread. By linking to the first message in a thread, from all subsequent replies, you'll have an easy way to pull all replies together in one view. I hope this helps. Chris -- Chris Anderson http://jchris.mfdz.com