Round float value of minimum_should_match (#12688)

### What problem does this PR solve?

In paragraph() of class FulltextQueryer, "len(keywords) / 10" should be
rounded to integer before set to minimum_should_match.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
qinling0210
2026-01-19 11:39:33 +08:00
committed by GitHub
parent 57d189b483
commit 828ae1e82f

View File

@ -232,5 +232,5 @@ class FulltextQueryer(QueryBase):
keywords.append(f"{tk}^{w}")
return MatchTextExpr(self.query_fields, " ".join(keywords), 100,
{"minimum_should_match": min(3, len(keywords) / 10),
{"minimum_should_match": min(3, round(len(keywords) / 10)),
"original_query": " ".join(origin_keywords)})