aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-25 01:16:27 +0100
committerGitHub <noreply@github.com>2024-01-25 01:16:27 +0100
commit2e4819abd7969ba3ba5aadcc782b469c23a899e5 (patch)
tree302f50744669c428c91785ced655ca03e653a3f5
parentd9ad2620bdbacfb64e714382efaa393b96157feb (diff)
parent0c1a3f857b41d207f006a91fd1ab5476123a4089 (diff)
Merge pull request #30054 from vespa-engine/toregge/use-max-value-for-words-in-utf8-flexible-string-field-searcher-matchtermsv8.293.15
Use max value for words in UTF8FlexibleStringFieldSearcher::matchTerm…
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/utf8flexiblestringfieldsearcher.cpp3
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;
}