return (env && strcmp (env, "") != 0);
}
/* Explicit destructor call for placement new */
static int
return (env && strcmp (env, "") != 0);
}
/* Explicit destructor call for placement new */
static int
- /* Xapian doesn't support skip_to on terms from a query since
- * they are unordered, so cache a copy of all terms in
- * something searchable.
- */
+ /* Xapian doesn't support skip_to on terms from a query since
+ * they are unordered, so cache a copy of all terms in
+ * something searchable.
+ */
for (Xapian::TermIterator t = query->xapian_query.get_terms_begin ();
t != query->xapian_query.get_terms_end (); ++t)
for (Xapian::TermIterator t = query->xapian_query.get_terms_begin ();
t != query->xapian_query.get_terms_end (); ++t)
_notmuch_database_log (query->notmuch,
"A Xapian exception occurred parsing query: %s\n",
error.get_msg ().c_str ());
_notmuch_database_log (query->notmuch,
"A Xapian exception occurred parsing query: %s\n",
error.get_msg ().c_str ());
return status;
term = talloc_asprintf (query, "%s%s", _find_prefix ("tag"), tag);
return status;
term = talloc_asprintf (query, "%s%s", _find_prefix ("tag"), tag);
return NOTMUCH_STATUS_IGNORED;
_notmuch_string_list_append (query->exclude_terms, term);
return NOTMUCH_STATUS_IGNORED;
_notmuch_string_list_append (query->exclude_terms, term);
Xapian::MSetIterator iterator;
if (strcmp (query_string, "") == 0 ||
Xapian::MSetIterator iterator;
if (strcmp (query_string, "") == 0 ||
final_query = mail_query;
} else {
final_query = Xapian::Query (Xapian::Query::OP_AND,
final_query = mail_query;
} else {
final_query = Xapian::Query (Xapian::Query::OP_AND,
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
final_query, exclude_query);
} else { /* NOTMUCH_EXCLUDE_FLAG */
exclude_query = Xapian::Query (Xapian::Query::OP_AND,
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
final_query, exclude_query);
} else { /* NOTMUCH_EXCLUDE_FLAG */
exclude_query = Xapian::Query (Xapian::Query::OP_AND,
enquire.set_query (exclude_query);
mset = enquire.get_mset (0, notmuch->xapian_db->get_doccount ());
enquire.set_query (exclude_query);
mset = enquire.get_mset (0, notmuch->xapian_db->get_doccount ());
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch,
"A Xapian exception occurred performing query: %s\n",
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch,
"A Xapian exception occurred performing query: %s\n",
- max = MAX(max, g_array_index (arr, unsigned int, i));
- bitmap = talloc_zero_array (ctx, unsigned char, DOCIDSET_WORD(max) + 1);
+ max = MAX (max, g_array_index (arr, unsigned int, i));
+ bitmap = talloc_zero_array (ctx, unsigned char, DOCIDSET_WORD (max) + 1);
for (unsigned int i = 0; i < arr->len; i++) {
unsigned int doc_id = g_array_index (arr, unsigned int, i);
for (unsigned int i = 0; i < arr->len; i++) {
unsigned int doc_id = g_array_index (arr, unsigned int, i);
final_query = mail_query;
} else {
final_query = Xapian::Query (Xapian::Query::OP_AND,
final_query = mail_query;
} else {
final_query = Xapian::Query (Xapian::Query::OP_AND,
exclude_query = _notmuch_exclude_tags (query);
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
exclude_query = _notmuch_exclude_tags (query);
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
- enquire.set_weighting_scheme(Xapian::BoolWeight());
- enquire.set_docid_order(Xapian::Enquire::ASCENDING);
+ enquire.set_weighting_scheme (Xapian::BoolWeight ());
+ enquire.set_docid_order (Xapian::Enquire::ASCENDING);
/*
* Set the checkatleast parameter to the number of documents
* in the database to make get_matches_estimated() exact.
/*
* Set the checkatleast parameter to the number of documents
* in the database to make get_matches_estimated() exact.
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch,
"A Xapian exception occurred performing query: %s\n",
} catch (const Xapian::Error &error) {
_notmuch_database_log (notmuch,
"A Xapian exception occurred performing query: %s\n",
_notmuch_database_log_append (notmuch,
"Query string was: %s\n",
query->query_string);
_notmuch_database_log_append (notmuch,
"Query string was: %s\n",
query->query_string);