From 15736c57c3020d6f2ec8407ad4a74714fd9c1355 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 10 Mar 2025 13:56:56 +0800 Subject: [PATCH] Fix: empty query issue. (#5830) ### What problem does this PR solve? #5214 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/nlp/query.py b/rag/nlp/query.py index d3c2f1432..b58efb859 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