Skip to content

Commit

Permalink
Fix: search issue for graphrag (infiniflow#3546)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

infiniflow#3538

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Nov 21, 2024
1 parent e10b0e6 commit 58a2200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphrag/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def merge_into_first(sres, title="") -> dict[str, str]:

ent_res = self.dataStore.search(src, list(), condition, [matchText, matchDense, fusionExpr], OrderByExpr(), 0, 32, idxnm, kb_ids)
ent_res_fields = self.dataStore.getFields(ent_res, src)
entities = [d.get["name_kwd"] for d in ent_res_fields.values() if d.get("name_kwd")]
entities = [d["name_kwd"] for d in ent_res_fields.values() if d.get("name_kwd")]
ent_ids = self.dataStore.getChunkIds(ent_res)
ent_content = merge_into_first(ent_res_fields, "-Entities-")
if ent_content:
Expand Down

0 comments on commit 58a2200

Please sign in to comment.