Kevin Hu
commited on
Commit
·
e2bbb9d
1
Parent(s):
0202117
Fix: search issue for graphrag (#3546)
Browse files### What problem does this PR solve?
#3538
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- graphrag/search.py +1 -1
graphrag/search.py
CHANGED
@@ -67,7 +67,7 @@ class KGSearch(Dealer):
|
|
67 |
|
68 |
ent_res = self.dataStore.search(src, list(), condition, [matchText, matchDense, fusionExpr], OrderByExpr(), 0, 32, idxnm, kb_ids)
|
69 |
ent_res_fields = self.dataStore.getFields(ent_res, src)
|
70 |
-
entities = [d
|
71 |
ent_ids = self.dataStore.getChunkIds(ent_res)
|
72 |
ent_content = merge_into_first(ent_res_fields, "-Entities-")
|
73 |
if ent_content:
|
|
|
67 |
|
68 |
ent_res = self.dataStore.search(src, list(), condition, [matchText, matchDense, fusionExpr], OrderByExpr(), 0, 32, idxnm, kb_ids)
|
69 |
ent_res_fields = self.dataStore.getFields(ent_res, src)
|
70 |
+
entities = [d["name_kwd"] for d in ent_res_fields.values() if d.get("name_kwd")]
|
71 |
ent_ids = self.dataStore.getChunkIds(ent_res)
|
72 |
ent_content = merge_into_first(ent_res_fields, "-Entities-")
|
73 |
if ent_content:
|