]> git.notmuchmail.org Git - notmuch/commit
lib: search_threads: Fix nested search to handle original search of "*"
authorCarl Worth <cworth@cworth.org>
Thu, 15 Apr 2010 16:15:10 +0000 (09:15 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 15 Apr 2010 21:54:40 +0000 (14:54 -0700)
commitc48dcc302c5509452e5364a8aebdfa03f33a6857
tree87752befe3e34c5d3e49c2a1a94ff414ed938955
parentf0050f6dd2de064a650a8d89f7031f0bef9c2667
lib: search_threads: Fix nested search to handle original search of "*"

When constructing a thread, we usually run a nested query to find all
messages in the thread that match the original search string. However,
we need to have special-case handling of an original search string of
"*" now that that is a supported means of specifying all messages.

The special-case ends up bein quite simple---we do less work, (just
skipping the nested search since we know that all messages must
match). I had been wanting to write this identical code to more
efficiently handle "notmuch search thread:<foo>" which was previously
running two identical searches. So that case is now more efficient as
well.
lib/thread.cc