Skip to content

Commit

Permalink
Merge pull request #30054 from vespa-engine/toregge/use-max-value-for…
Browse files Browse the repository at this point in the history
…-words-in-utf8-flexible-string-field-searcher-matchterms

Use max value for words in UTF8FlexibleStringFieldSearcher::matchTerm…
  • Loading branch information
baldersheim authored Jan 25, 2024
2 parents d9ad262 + 0c1a3f8 commit 2e4819a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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;
}
Expand Down

0 comments on commit 2e4819a

Please sign in to comment.