Skip to content

Commit

Permalink
fix(graphrag): variable refernence error (#2136)
Browse files Browse the repository at this point in the history
### 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: 陈晓强 <[email protected]>
  • Loading branch information
dearjane and 陈晓强 authored Aug 28, 2024
1 parent e627ee9 commit 3abc9be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphrag/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def merge_into_first(sres, title=""):
s = s.query(bqry)[0: 6]
s = s.to_dict()
txt_res = self.es.search(deepcopy(s), idxnm=idxnm, timeout="600s", src=src)
txt_ids = self.es.getDocIds(comm_res)
txt_ids = self.es.getDocIds(txt_res)
if merge_into_first(txt_res, "-Original Content-"):
txt_ids = comm_ids[0:1]
txt_ids = txt_ids[0:1]

return self.SearchResult(
total=len(ent_ids) + len(comm_ids) + len(txt_ids),
Expand Down

0 comments on commit 3abc9be

Please sign in to comment.