mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 05:19:05 +08:00
make term similarity robust (#2212)
### What problem does this PR solve? ### Type of change - [x] Performance Improvement
This commit is contained in:
parent
4d9e9f0dbb
commit
5a2c542ce2
@ -106,10 +106,9 @@ class EsQueryer:
|
||||
m) for m in sm]
|
||||
sm = [EsQueryer.subSpecialChar(m) for m in sm if len(m) > 1]
|
||||
sm = [m for m in sm if len(m) > 1]
|
||||
if len(sm) < 2:
|
||||
sm = []
|
||||
|
||||
keywords.append(re.sub(r"[ \\\"']+", "", tk))
|
||||
keywords.extend(sm)
|
||||
if len(keywords) >= 12: break
|
||||
|
||||
tk_syns = self.syn.lookup(tk)
|
||||
|
Loading…
x
Reference in New Issue
Block a user