Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(graphrag): variable refernence error #2136

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(graphrag): variable refernence error
  • Loading branch information
陈晓强 committed Aug 28, 2024
commit 33774001eb7248a0cb841708d171acb09a260b65
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