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:
Dirk-Jan C. Binnema
2023-09-09 11:57:05 +03:00
parent f6122ecc9e
commit 264bb092f0
20 changed files with 207 additions and 81 deletions

View File

@ -94,9 +94,12 @@ Mu::mu_test_init(int *argc, char ***argv)
{
const auto tmpdir{test_random_tmpdir()};
g_unsetenv("XAPIAN_CJK_NGRAM");
g_setenv("MU_TEST", "yes", TRUE);
g_setenv("XDG_CACHE_HOME", tmpdir.c_str(), TRUE);
setlocale(LC_ALL, "");
g_test_init(argc, argv, NULL);
g_test_bug_base("https://github.com/djcb/mu/issues/");