]> git.notmuchmail.org Git - notmuch/commit
Add the magic to allow searches such as "tag:inbox".
authorCarl Worth <cworth@cworth.org>
Sun, 25 Oct 2009 05:23:58 +0000 (22:23 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 25 Oct 2009 05:23:58 +0000 (22:23 -0700)
commitaa46a683a85af0d0234720bd93ae3d09bc360910
tree38d946e5743ea61faa4ff2fdfdd1d2c29f32fd37
parent17f9c6a0ef7fb303c4b60422667ad063d91234bc
Add the magic to allow searches such as "tag:inbox".

The key for this is call add_boolean_prefix on the QueryParser
object. That tells the query parser to take something like "tag:inbox"
and transform it into the "Linbox" term and do what it needs to do to
make this term a requirement of the search. We're starting to have a
real system here.

Also, I didn't want to expose the ugly name of "msgid" to the user, so
we add a prefix name of simply "id" instead.
database.cc