const char *query_string;
notmuch_sort_t sort;
notmuch_string_list_t *exclude_terms;
- notmuch_bool_t omit_excluded_messages;
+ notmuch_bool_t omit_excluded;
};
typedef struct _notmuch_mset_messages {
query->exclude_terms = _notmuch_string_list_create (query);
- query->omit_excluded_messages = FALSE;
+ query->omit_excluded = TRUE;
return query;
}
}
void
-notmuch_query_set_omit_excluded_messages (notmuch_query_t *query, notmuch_bool_t omit)
+notmuch_query_set_omit_excluded (notmuch_query_t *query, notmuch_bool_t omit_excluded)
{
- query->omit_excluded_messages = omit;
+ query->omit_excluded = omit_excluded;
}
void
if (query->exclude_terms) {
exclude_query = _notmuch_exclude_tags (query, final_query);
- exclude_query = Xapian::Query (Xapian::Query::OP_AND,
- exclude_query, final_query);
- if (query->omit_excluded_messages)
+ if (query->omit_excluded)
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
final_query, exclude_query);
else {
+ exclude_query = Xapian::Query (Xapian::Query::OP_AND,
+ exclude_query, final_query);
+
enquire.set_weighting_scheme (Xapian::BoolWeight());
enquire.set_query (exclude_query);