ragflow/graphrag
Yue-Lyu123 ece59034f7
fix: Resolve KnowledgeGraph entity resolution errors (#6653) (#6691)
### Related Issue: #6653
### Environment:

Using nightly version

Elasticsearch database

### Bug Description:
When clicking the "Entity Resolution" button in KnowledgeGraph,
encountered the following errors:

graphrag/entity_resolution.py

```
list(sub_connect_graph.nodes) AttributeError
```

graphrag/general/extractor.py
```
node0_attrs[attr] = sorted(set(node0_attrs[attr].extend(node1_attrs[attr])))
TypeError: 'NoneType' object is not iterable
```
```
for attr in ["keywords", "source_id"]:  
 KeyError I think attribute "keywords" is in edges not nodes
```
graphrag/utils.py
```
settings.docStoreConn.delete()  # Sync function called as async
```
### Changes Made:

Fixed AttributeError in entity_resolution.py by properly handling graph
nodes

Fixed TypeError and KeyError in extractor.py by separate operations

Corrected async/sync mismatch in document deletion call
2025-03-31 22:31:35 +08:00
..
general fix: Resolve KnowledgeGraph entity resolution errors (#6653) (#6691) 2025-03-31 22:31:35 +08:00
light Optimize graphrag again (#6513) 2025-03-26 15:34:42 +08:00
__init__.py Cache the result from llm for graphrag and raptor (#4051) 2024-12-17 09:48:03 +08:00
entity_resolution.py fix: Resolve KnowledgeGraph entity resolution errors (#6653) (#6691) 2025-03-31 22:31:35 +08:00
entity_resolution_prompt.py Add graphrag (#1793) 2024-08-02 18:51:14 +08:00
query_analyze_prompt.py Light GraphRAG (#4585) 2025-01-22 19:43:14 +08:00
search.py Fix: float transfer exception. (#6197) 2025-03-18 11:13:44 +08:00
utils.py fix: Resolve KnowledgeGraph entity resolution errors (#6653) (#6691) 2025-03-31 22:31:35 +08:00