From 8d531106ea4e2c139ba7d62966ce27a91819bf0e Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 17 Dec 2024 16:31:58 +0800 Subject: [PATCH] Fix position lost issue. (#4068) ### What problem does this PR solve? #4040 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/nlp/search.py b/rag/nlp/search.py index 9f877ef4fb4..837969761a4 100644 --- a/rag/nlp/search.py +++ b/rag/nlp/search.py @@ -72,7 +72,7 @@ def search(self, req, idx_names: str | list[str], kb_ids: list[str], emb_mdl=Non ps = int(req.get("size", topk)) offset, limit = pg * ps, (pg + 1) * ps - src = req.get("fields", ["docnm_kwd", "content_ltks", "kb_id", "img_id", "title_tks", "important_kwd", + src = req.get("fields", ["docnm_kwd", "content_ltks", "kb_id", "img_id", "title_tks", "important_kwd", "position_int", "doc_id", "page_num_int", "top_int", "create_timestamp_flt", "knowledge_graph_kwd", "question_kwd", "question_tks", "available_int", "content_with_weight", "pagerank_fea"]) kwds = set([])