dovecot-2.1: fts-lucene: Fixed to work without stemmer support.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 19 18:34:02 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/02c84406c661
changeset: 13515:02c84406c661
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 19 18:33:40 2011 +0300
description:
fts-lucene: Fixed to work without stemmer support.
diffstat:
src/plugins/fts-lucene/fts-lucene-plugin.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 97135a53951e -r 02c84406c661 src/plugins/fts-lucene/fts-lucene-plugin.c
--- a/src/plugins/fts-lucene/fts-lucene-plugin.c Mon Sep 19 18:28:14 2011 +0300
+++ b/src/plugins/fts-lucene/fts-lucene-plugin.c Mon Sep 19 18:33:40 2011 +0300
@@ -18,7 +18,6 @@
{
const char *const *tmp;
- set->default_language = "english";
for (tmp = t_strsplit_spaces(str, " "); *tmp != NULL; tmp++) {
if (strncmp(*tmp, "default_language=", 17) == 0) {
set->default_language =
@@ -46,6 +45,9 @@
"but Dovecot built without stemmer support");
return -1;
}
+#else
+ if (set->default_language == NULL)
+ set->default_language = "english";
#endif
#ifndef HAVE_LUCENE_TEXTCAT
if (set->textcat_conf != NULL) {
@@ -60,7 +62,8 @@
uint32_t fts_lucene_settings_checksum(const struct fts_lucene_settings *set)
{
/* only the default language change matters */
- return crc32_str(set->default_language);
+ return set->default_language == NULL ? 0 :
+ crc32_str(set->default_language);
}
static void fts_lucene_mail_user_created(struct mail_user *user)
More information about the dovecot-cvs
mailing list