Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Round float value of minimum_should_match (#12688)

qinling0210828ae1e82f13
diff --git a/rag/nlp/query.py b/rag/nlp/query.py
index 402b240fe9..096cfa4cea 100644
--- a/rag/nlp/query.py
+++ b/rag/nlp/query.py
@@ -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)})