]> git.notmuchmail.org Git - notmuch/commitdiff
Fix bit-twiddling brain damage in notmuch_query_search
authorCarl Worth <cworth@cworth.org>
Sun, 25 Oct 2009 05:20:13 +0000 (22:20 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 25 Oct 2009 05:20:13 +0000 (22:20 -0700)
Here's the big bug that was preventing any searches from working at
all like desired. I did the work to carefully pick out exactly the
flags that I wanted, and then I threw it away by trying to combine
them with & instead of | (so just passing 0 for flags instead).

Much better now.

query.cc

index f66ee55649767639006fade6c22a6e963848adb7..5750167580c0f94ecf0eae11a18aef7ce399300d 100644 (file)
--- a/query.cc
+++ b/query.cc
@@ -95,10 +95,10 @@ notmuch_query_search (notmuch_query_t *query)
        Xapian::Query mail_query ("Kmail");
        Xapian::Query string_query, final_query;
        Xapian::MSet mset;
-       unsigned int flags = (Xapian::QueryParser::FLAG_BOOLEAN &
-                             Xapian::QueryParser::FLAG_PHRASE &
-                             Xapian::QueryParser::FLAG_LOVEHATE &
-                             Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE &
+       unsigned int flags = (Xapian::QueryParser::FLAG_BOOLEAN |
+                             Xapian::QueryParser::FLAG_PHRASE |
+                             Xapian::QueryParser::FLAG_LOVEHATE |
+                             Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE |
                              Xapian::QueryParser::FLAG_WILDCARD);
 
        if (strcmp (query_string, "") == 0) {