From 6f2c3a3c3cbfafdead17fef1e0b7982d5303169f Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Thu, 6 Feb 2025 10:11:52 +0800 Subject: [PATCH] Fix too long query exception. (#4729) ### What problem does this PR solve? ### 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 af96a8722..aa79496e2 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)