mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-11-10 21:32:43 +08:00
1 parent
2f2d1569e6
commit
765cdc2ec2
2 files changed
+4
-3
No files matched your search
@@ -21,7 +21,7 @@ from common.query_base import QueryBase
|
||||
from common.doc_store.doc_store_base import MatchDenseExpr, MatchTextExpr
|
||||
from common.float_utils import get_float
|
||||
from rag.nlp import rag_tokenizer, term_weight, synonym
|
||||
|
||||
from rag.utils.redis_conn import REDIS_CONN
|
||||
|
||||
def get_vector(txt, emb_mdl, topk=10, similarity=0.1):
|
||||
if isinstance(similarity, str) and len(similarity) > 0:
|
||||
@@ -44,7 +44,7 @@ class MsgTextQuery(QueryBase):
|
||||
|
||||
def __init__(self):
|
||||
self.tw = term_weight.Dealer()
|
||||
self.syn = synonym.Dealer()
|
||||
self.syn = synonym.Dealer(redis=REDIS_CONN.REDIS if REDIS_CONN.is_alive() else None)
|
||||
self.query_fields = [
|
||||
"content"
|
||||
]
|
||||
|
||||
+2
-1
@@ -22,12 +22,13 @@ from collections import defaultdict
|
||||
from common.query_base import QueryBase
|
||||
from common.doc_store.doc_store_base import MatchTextExpr
|
||||
from rag.nlp import rag_tokenizer, term_weight, synonym
|
||||
from rag.utils.redis_conn import REDIS_CONN
|
||||
|
||||
|
||||
class FulltextQueryer(QueryBase):
|
||||
def __init__(self):
|
||||
self.tw = term_weight.Dealer()
|
||||
self.syn = synonym.Dealer()
|
||||
self.syn = synonym.Dealer(redis=REDIS_CONN.REDIS if REDIS_CONN.is_alive() else None)
|
||||
self.query_fields = [
|
||||
"title_tks^10",
|
||||
"title_sm_tks^5",
|
||||
|
||||
Reference in new issue
Block a user