couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject Re: threaded email view
Date Mon, 24 Nov 2008 22:22:31 GMT
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 Anderson

View raw message