The header fields I mentioned are the only ones available in a typical
email. If nobody can come up with something, I will resort to adding
extra data at import time but that would be nice to avoid.
It would be nifty if partially iterative queries like this could be done
in couchdb and still take advantage of map/reduce.
Chris Anderson wrote:
On Sun, Nov 23, 2008 at 10:57 PM, Jedediah Smith
<[EMAIL PROTECTED]> 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