Skip to content

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

Fix too long query exception. (#4729)

Kevin Hu6f2c3a3c3cbf
diff --git a/rag/nlp/query.py b/rag/nlp/query.py
index af96a87220..aa79496e29 100644
--- a/rag/nlp/query.py
+++ b/rag/nlp/query.py
@@ -185,7 +185,7 @@ class FulltextQueryer:
for s in syns
]
)
- if syns:
+ if syns and tms:
tms = f"({tms})^5 OR ({syns})^0.7"
qs.append(tms)