Skip to content

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

Fix: empty query issue. (#5830)

Kevin Hu15736c57c302
diff --git a/rag/nlp/query.py b/rag/nlp/query.py
index d3c2f14326..b58efb8599 100644
--- a/rag/nlp/query.py
+++ b/rag/nlp/query.py
@@ -66,7 +66,7 @@ class FulltextQueryer:
otxt = txt
for r, p in patts:
txt = re.sub(r, p, txt, flags=re.IGNORECASE)
- if not otxt:
+ if not txt:
txt = otxt
return txt