]> git.notmuchmail.org Git - notmuch/commit
lib: Add non-content terms with a WDF value of 0.
authorCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2010 19:18:27 +0000 (11:18 -0800)
committerCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2010 19:18:27 +0000 (11:18 -0800)
commitccf2e0cc4211c276da1db43cdca7ee11018c391d
tree7b20fa1eb63cd822c5464fc9c44224e7e810c1ae
parent45b1856782beca246cd2670ea6b122b0c9e06fc0
lib: Add non-content terms with a WDF value of 0.

The WDF is the "within-document frequency" value for a particular
term. It's intended to provide an indication of how frequent a term is
within a document, (for use in computing relevance). Xapian's term
generator already computes WDF values when we use that, (which we do
for indexing all mail content).

We don't use the term generator when adding single terms for things
that don't actually appear in the mail document, (such as tags, the
filename, etc.). In this case, the WDF value for these terms doesn't
matter much.

But Xapian's flint backend can be more efficient with changes to terms
that don't affect the document "length". So there's a performance
advantage for manipulating tags (with the flint backend) if the WDF of
these terms is 0.
lib/directory.cc
lib/message.cc