storing From and Subject in xapian

Istvan Marko notmuch at kismala.com
Mon May 16 00:33:29 PDT 2011


Austin Clements <amdragon at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notmuch-value3.patch
Type: text/x-patch
Size: 3296 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110516/3667bc4c/attachment.bin>
-------------- next part --------------

-- 
	Istvan


More information about the notmuch mailing list