* mu-msg-field, mu-query: refactor, make queries use boolean only for maildir,

path; this enables wildcard searching for other fields
This commit is contained in:
Dirk-Jan C. Binnema
2011-05-20 21:30:04 +03:00
parent ce7c354f74
commit 3aa034f0f2
3 changed files with 274 additions and 199 deletions

View File

@ -194,6 +194,33 @@ gboolean mu_msg_field_xapian_term (MuMsgFieldId id) G_GNUC_PURE;
gboolean mu_msg_field_xapian_value (MuMsgFieldId id) G_GNUC_PURE;
/**
* whether we should use add_boolean_prefix (see Xapian documentation)
* for this field in queries. Used in mu-query.cc
*
* @param id a MuMsgFieldId
*
* @return TRUE if this field wants add_boolean_prefix, FALSE
* otherwise
*/
gboolean mu_msg_field_uses_boolean_prefix (MuMsgFieldId id) G_GNUC_PURE;
/**
* wether this fields needs a prefix in queries -- ie,
* 'msgid:<some-message-id>' will only match with the explicit prefix,
* while 'subject:foo' will also match as just 'foo'. Used in
* mu-query.cc
*
* @param id a MuMsgFieldId
*
* @return TRUE if this field only matches with a prefix, FALSE
* otherwise
*/
gboolean mu_msg_field_needs_prefix (MuMsgFieldId id) G_GNUC_PURE;
/**
* should this field be escaped for xapian? in practice, should
* word-breaking chars be replaced with '_'?