dovecot-2.2: fts: lib-fts search arg expansion wasn't done for n...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 4 18:59:56 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/ee82bdc63939
changeset: 18829:ee82bdc63939
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 04 21:57:32 2015 +0300
description:
fts: lib-fts search arg expansion wasn't done for non-TEXT/BODY searches when fts_enforced=no
diffstat:
src/plugins/fts/fts-search.c | 5 +++++
src/plugins/fts/fts-storage.c | 6 ------
2 files changed, 5 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 7cb0bc84914d -r ee82bdc63939 src/plugins/fts/fts-search.c
--- a/src/plugins/fts/fts-search.c Thu Jun 04 00:45:11 2015 +0300
+++ b/src/plugins/fts/fts-search.c Thu Jun 04 21:57:32 2015 +0300
@@ -7,6 +7,7 @@
#include "mail-search.h"
#include "../virtual/virtual-storage.h"
#include "fts-api-private.h"
+#include "fts-search-args.h"
#include "fts-search-serialize.h"
#include "fts-storage.h"
@@ -353,6 +354,10 @@
&seq1, &seq2);
fctx->first_unindexed_seq = seq1 != 0 ? seq1 : (uint32_t)-1;
+ if ((fctx->backend->flags & FTS_BACKEND_FLAG_TOKENIZED_INPUT) != 0) {
+ if (fts_search_args_expand(fctx->backend, fctx->args) < 0)
+ return;
+ }
fts_search_serialize(fctx->orig_matches, fctx->args->args);
if (fts_search_lookup_level(fctx, fctx->args->args, TRUE) == 0) {
diff -r 7cb0bc84914d -r ee82bdc63939 src/plugins/fts/fts-storage.c
--- a/src/plugins/fts/fts-storage.c Thu Jun 04 00:45:11 2015 +0300
+++ b/src/plugins/fts/fts-storage.c Thu Jun 04 21:57:32 2015 +0300
@@ -14,7 +14,6 @@
#include "fts-tokenizer.h"
#include "fts-indexer.h"
#include "fts-build-mail.h"
-#include "fts-search-args.h"
#include "fts-search-serialize.h"
#include "fts-plugin.h"
#include "fts-storage.h"
@@ -133,11 +132,6 @@
if (ret < 0)
return;
- if ((fctx->backend->flags & FTS_BACKEND_FLAG_TOKENIZED_INPUT) != 0) {
- if (fts_search_args_expand(fctx->backend, fctx->args) < 0)
- return;
- }
-
if (ret == 0) {
/* the index was up to date */
fts_search_lookup(fctx);
More information about the dovecot-cvs
mailing list