Skip to content

Commit

Permalink
Use max value for words in UTF8FlexibleStringFieldSearcher::matchTerm…
Browse files Browse the repository at this point in the history
…s().
  • Loading branch information
toregge committed Jan 24, 2024
1 parent 126bdc4 commit 0c1a3f8
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 0c1a3f8

Please sign in to comment.