support xapian ngrams
Xapian supports an "ngrams" option to help with languages/scripts without explicit wordbreaks, such as Chinese / Japanese / Korean. Add some plumbing for supporting this in mu as well. Experimental for now.
This commit is contained in:
@ -207,21 +207,7 @@ public:
|
||||
Result<Id> add_message(Message& msg, bool use_transaction = false,
|
||||
bool is_new = false);
|
||||
Result<Id> add_message(const std::string& path, bool use_transaction = false,
|
||||
bool is_new = false) {
|
||||
if (auto msg{Message::make_from_path(path)}; !msg)
|
||||
return Err(msg.error());
|
||||
else
|
||||
return add_message(msg.value(), use_transaction, is_new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a message in the store.
|
||||
*
|
||||
* @param msg a message
|
||||
* @param id the id for this message
|
||||
*
|
||||
* @return Ok() or an error.
|
||||
*/
|
||||
bool is_new = false);
|
||||
|
||||
/**
|
||||
* Remove a message from the store. It will _not_ remove the message
|
||||
@ -258,7 +244,6 @@ public:
|
||||
*/
|
||||
Option<Message> find_message(Id id) const;
|
||||
|
||||
|
||||
/**
|
||||
* Find the messages for the given ids
|
||||
*
|
||||
@ -288,7 +273,6 @@ public:
|
||||
*/
|
||||
bool contains_message(const std::string& path) const;
|
||||
|
||||
|
||||
/**
|
||||
* Options for moving
|
||||
*
|
||||
@ -437,6 +421,15 @@ public:
|
||||
*/
|
||||
std::vector<std::string> maildirs() const;
|
||||
|
||||
|
||||
/**
|
||||
* Compatible message-options for this store
|
||||
*
|
||||
* @return message-options.
|
||||
*/
|
||||
Message::Options message_options() const;
|
||||
|
||||
|
||||
/*
|
||||
* _almost_ private
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user