dovecot-2.2: fts: When tokenizing a search word, give "search" p...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 9 10:33:13 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/eff53aa9cb58
changeset: 18578:eff53aa9cb58
user: Timo Sirainen <tss at iki.fi>
date: Sat May 09 13:31:14 2015 +0300
description:
fts: When tokenizing a search word, give "search" parameter to all the tokenizers.
diffstat:
src/lib-fts/fts-tokenizer-generic.c | 3 +++
src/plugins/fts/fts-user.c | 7 +++----
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 162668a63045 -r eff53aa9cb58 src/lib-fts/fts-tokenizer-generic.c
--- a/src/lib-fts/fts-tokenizer-generic.c Sat May 09 13:30:41 2015 +0300
+++ b/src/lib-fts/fts-tokenizer-generic.c Sat May 09 13:31:14 2015 +0300
@@ -53,6 +53,9 @@
"Invalid algorithm: %s", value);
return -1;
}
+ } else if (strcmp(key, "search") == 0) {
+ /* tokenizing a search string -
+ makes no difference to us */
} else {
*error_r = t_strdup_printf("Unknown setting: %s", key);
return -1;
diff -r 162668a63045 -r eff53aa9cb58 src/plugins/fts/fts-user.c
--- a/src/plugins/fts/fts-user.c Sat May 09 13:30:41 2015 +0300
+++ b/src/plugins/fts/fts-user.c Sat May 09 13:31:14 2015 +0300
@@ -148,10 +148,9 @@
set_key = t_strdup_printf("fts_tokenizers_%s", tokenizer_set_name);
str = mail_user_plugin_getenv(user, set_key);
- /* If the email-address tokenizer is included in the search
- tokenizer, add a setting. */
- if (search && strcmp(fts_tokenizer_name(tokenizer_class),
- FTS_TOKENIZER_EMAIL_ADDRESS_NAME) == 0) {
+ /* tell the tokenizers that we're tokenizing a search string
+ (instead of tokenizing indexed data) */
+ if (search) {
if (str == NULL)
str = "search yes";
else
More information about the dovecot-cvs
mailing list