Re: storing From and Subject in xapian

Subject: Re: storing From and Subject in xapian

Date: Mon, 16 May 2011 00:33:29 -0700

To: Austin Clements

Cc: notmuch@notmuchmail.org

From: Istvan Marko


Austin Clements <amdragon@mit.edu> writes:

> I wonder if a better approach would be to use
> notmuch_message_get_header everywhere, rather than introducing
> _notmuch_message_get_header_value, and have it simply recognize
> headers that can be retrieved directly from the database.  Then
> library callers could take advantage of this optimization and it could
> be trivially extended to other headers in the future.

That's a good idea, updated patch below. This version also has fallback
handling for database entries that don't have the new header value
fields.

I couldn't find a way to have the Xapian API differentiate between
undefined and blank value fields so empty subject lines are encoded as a
single space.

Also, the address completion discussion made me think that maybe a value
field containing To/Cc/Bcc could be added too to avoid message file
parsing for the address search case but I haven't tried implementing
that yet.

-- 
	Istvan

Thread: