diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-01-24 21:24:15 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-01-24 21:24:15 +0100 |
commit | 0c1a3f857b41d207f006a91fd1ab5476123a4089 (patch) | |
tree | 53284ecdb3466699c3e63966e5e2fc0ce554d91e | |
parent | 126bdc4405385e7b70e1018d1f28e3aaa7e92e60 (diff) |
Use max value for words in UTF8FlexibleStringFieldSearcher::matchTerms().
-rw-r--r-- | streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp b/streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp index 5f626ccb962..4a8e7a43475 100644 --- a/streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp +++ b/streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp @@ -2,6 +2,7 @@ #include "utf8flexiblestringfieldsearcher.h" #include <vespa/searchlib/query/streaming/fuzzy_term.h> #include <vespa/searchlib/query/streaming/regexp_term.h> +#include <algorithm> #include <cassert> #include <vespa/log/log.h> @@ -24,7 +25,7 @@ UTF8FlexibleStringFieldSearcher::matchTerms(const FieldRef & f, const size_t min (void) mintsz; size_t words = 0; for (auto qt : _qtl) { - words = matchTerm(f, *qt); + words = std::max(words, matchTerm(f, *qt)); } return words; } |