diff --git a/src/mu-query-xapian.cc b/src/mu-query-xapian.cc index 226a5ed4..60a4c145 100644 --- a/src/mu-query-xapian.cc +++ b/src/mu-query-xapian.cc @@ -116,11 +116,11 @@ add_prefix (const MuMsgField* field, Xapian::QueryParser* qparser) const std::string prefix (mu_msg_field_xapian_prefix(field)); - qparser->add_boolean_prefix(std::string(mu_msg_field_name(field)), - prefix); - qparser->add_boolean_prefix(std::string(mu_msg_field_shortcut(field)), - prefix); - + qparser->add_boolean_prefix + (std::string(mu_msg_field_name(field)), prefix); + qparser->add_boolean_prefix + (std::string(mu_msg_field_shortcut(field)), prefix); + /* make the empty string match this field too*/ qparser->add_prefix ("", prefix); } @@ -138,7 +138,7 @@ mu_query_xapian_new (const char* xpath) } if (!mu_util_xapian_db_version_up_to_date (xpath)) { - g_warning ("%s is not up-to-date, needs full reindex", + g_warning ("%s is not up-to-date, needs a full update", xpath); return NULL; } @@ -146,7 +146,7 @@ mu_query_xapian_new (const char* xpath) mqx = g_new (MuQueryXapian, 1); if (!init_mu_query_xapian (mqx, xpath)) { - g_warning ("failed to initalize xapian query"); + g_warning ("failed to initialize the Xapian query"); g_free (mqx); return NULL; } @@ -155,7 +155,6 @@ mu_query_xapian_new (const char* xpath) } - void mu_query_xapian_destroy (MuQueryXapian *self) { @@ -163,6 +162,7 @@ mu_query_xapian_destroy (MuQueryXapian *self) return; uninit_mu_query_xapian (self); + g_free (self); } @@ -222,7 +222,6 @@ needs_quotes (const char* str) return FALSE; } - char* mu_query_xapian_combine (const gchar **params, gboolean connect_or) { diff --git a/src/mu-store-xapian.cc b/src/mu-store-xapian.cc index 7b5905bd..a105112d 100644 --- a/src/mu-store-xapian.cc +++ b/src/mu-store-xapian.cc @@ -207,9 +207,8 @@ add_terms_values_string (Xapian::Document& doc, MuMsgGMime *msg, termgen.set_document (doc); termgen.index_text_without_positions (str, 1, prefix); } else { - /* terms can be up to - * MU_STORE_XAPIAN_MAX_TERM_LENGTH (240) long; this is - * a Xapian limit */ + /* terms can be up to MU_STORE_XAPIAN_MAX_TERM_LENGTH + * (240) long; this is a Xapian limit */ doc.add_term (std::string (prefix + value, 0, MU_STORE_XAPIAN_MAX_TERM_LENGTH)); }