* cosmetics

This commit is contained in:
Dirk-Jan C. Binnema
2010-01-24 01:37:26 +02:00
parent 508a645e7e
commit cf6c5d0a84
2 changed files with 10 additions and 12 deletions

View File

@ -116,10 +116,10 @@ add_prefix (const MuMsgField* field, Xapian::QueryParser* qparser)
const std::string prefix (mu_msg_field_xapian_prefix(field)); const std::string prefix (mu_msg_field_xapian_prefix(field));
qparser->add_boolean_prefix(std::string(mu_msg_field_name(field)), qparser->add_boolean_prefix
prefix); (std::string(mu_msg_field_name(field)), prefix);
qparser->add_boolean_prefix(std::string(mu_msg_field_shortcut(field)), qparser->add_boolean_prefix
prefix); (std::string(mu_msg_field_shortcut(field)), prefix);
/* make the empty string match this field too*/ /* make the empty string match this field too*/
qparser->add_prefix ("", prefix); 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)) { 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); xpath);
return NULL; return NULL;
} }
@ -146,7 +146,7 @@ mu_query_xapian_new (const char* xpath)
mqx = g_new (MuQueryXapian, 1); mqx = g_new (MuQueryXapian, 1);
if (!init_mu_query_xapian (mqx, xpath)) { 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); g_free (mqx);
return NULL; return NULL;
} }
@ -155,7 +155,6 @@ mu_query_xapian_new (const char* xpath)
} }
void void
mu_query_xapian_destroy (MuQueryXapian *self) mu_query_xapian_destroy (MuQueryXapian *self)
{ {
@ -163,6 +162,7 @@ mu_query_xapian_destroy (MuQueryXapian *self)
return; return;
uninit_mu_query_xapian (self); uninit_mu_query_xapian (self);
g_free (self); g_free (self);
} }
@ -222,7 +222,6 @@ needs_quotes (const char* str)
return FALSE; return FALSE;
} }
char* char*
mu_query_xapian_combine (const gchar **params, gboolean connect_or) mu_query_xapian_combine (const gchar **params, gboolean connect_or)
{ {

View File

@ -207,9 +207,8 @@ add_terms_values_string (Xapian::Document& doc, MuMsgGMime *msg,
termgen.set_document (doc); termgen.set_document (doc);
termgen.index_text_without_positions (str, 1, prefix); termgen.index_text_without_positions (str, 1, prefix);
} else { } else {
/* terms can be up to /* terms can be up to MU_STORE_XAPIAN_MAX_TERM_LENGTH
* MU_STORE_XAPIAN_MAX_TERM_LENGTH (240) long; this is * (240) long; this is a Xapian limit */
* a Xapian limit */
doc.add_term (std::string (prefix + value, 0, doc.add_term (std::string (prefix + value, 0,
MU_STORE_XAPIAN_MAX_TERM_LENGTH)); MU_STORE_XAPIAN_MAX_TERM_LENGTH));
} }