Skip to content

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

Fix: infinity rerank error. (#10760)

Kevin Huea73f13ebfc0
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index 74d38bb4bf..c10b803bd0 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -388,6 +388,7 @@ class Dealer:
else:
# Don't need rerank here since Infinity normalizes each way score before fusion.
sim = [sres.field[id].get("_score", 0.0) for id in sres.ids]
+ sim = [s if s is not None else 0. for s in sim]
tsim = sim
vsim = sim
# Already paginated in search function