dearjane
陈晓强
commited on
Commit
·
842fb8a
1
Parent(s):
8152dee
fix(graphrag): variable refernence error (#2136)
Browse files### What problem does this PR solve?
fix: Use wrong variable in graph rag step.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Co-authored-by: 陈晓强 <chenxiaoqiang@cvte.com>
- graphrag/search.py +2 -2
graphrag/search.py
CHANGED
@@ -93,9 +93,9 @@ class KGSearch(Dealer):
|
|
93 |
s = s.query(bqry)[0: 6]
|
94 |
s = s.to_dict()
|
95 |
txt_res = self.es.search(deepcopy(s), idxnm=idxnm, timeout="600s", src=src)
|
96 |
-
txt_ids = self.es.getDocIds(
|
97 |
if merge_into_first(txt_res, "-Original Content-"):
|
98 |
-
txt_ids =
|
99 |
|
100 |
return self.SearchResult(
|
101 |
total=len(ent_ids) + len(comm_ids) + len(txt_ids),
|
|
|
93 |
s = s.query(bqry)[0: 6]
|
94 |
s = s.to_dict()
|
95 |
txt_res = self.es.search(deepcopy(s), idxnm=idxnm, timeout="600s", src=src)
|
96 |
+
txt_ids = self.es.getDocIds(txt_res)
|
97 |
if merge_into_first(txt_res, "-Original Content-"):
|
98 |
+
txt_ids = txt_ids[0:1]
|
99 |
|
100 |
return self.SearchResult(
|
101 |
total=len(ent_ids) + len(comm_ids) + len(txt_ids),
|