Bump schema version to trigger update after we added html processing.
Since we're updating the database schema version, let's use the
opportunity to remove outdated data from the contacts-cache.
This is a bit of hack to include html text in results.
Of course, html text is not really plain text, so this is a bit of a
hack until we introduce some html parsing step.
Without this patch, I see the following error:
;; mu> (move :docid 1 :maildir "/.Archive")
[2b](:error 32818 :message "invalid flags ''")
flags should not default to "", which is not a valid flags string.
GCC 13s libstdc++ reduced its dependency on some headers like <cstdint>, so it's
no longer transitively included through various headers. Include it explicitly.
See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
../lib/utils/mu-error.hh:36:26: error: ‘uint32_t’ does not name a type
36 | static constexpr uint32_t SoftError = 1 << 23;
| ^~~~~~~~
Instead of being part of the ping command, create a separate
queries command, which is easier for updating. Ie. 'ping' implies "show
main screen" but we don't always want that side-effect.
Add a thin c++ wrapper for GLib's GRegex (which is a PCRE wrapper
itself). PCRE is much faster than C++ std::regex, it may even matter in
some use-cases.
Previously, we would conduct regular expression searches by
enumerating all values of a given term, manually regex-matching each
one against our search regular expression, remember all the term
values that matched our regular expression, then do a big Xapian
OR-query that matched any of those term values. In constructing this
OR-query, however, we would split each term value on space and add a
separate Xapian phrase search term for each resulting word. This
approach worked fine most of the time, beacuse when we index a term,
we index both each word in a term and the whole term by itself.
This word splitting produced false negatives in some matches, however,
because Xapian and the Mu-level word splitting code do word splitting
slightly differently and apply different transformations to the text
while splitting. (For example, Xapian transforms fancy Unicode
apostrophes to ASCII apostrophes.)
This patch avoids the problem by not word splitting when constructing
the big Xapian OR-query for finding the results of regular
expression matching.