From 7822d09f2e3a9fc01e0026b01f993b24bdc3c542 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Thu, 21 Nov 2024 11:12:05 +0800 Subject: [PATCH] Fix: search issue for graphrag --- graphrag/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphrag/search.py b/graphrag/search.py index 3fa962fcb4..69f150f4dd 100644 --- a/graphrag/search.py +++ b/graphrag/search.py @@ -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: