Skip to content
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
6 changes: 3 additions & 3 deletions src/neo4j_graphrag/experimental/components/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async def run(self) -> ResolutionStats:
UNWIND labels(entity) AS lab
WITH lab, entity
WHERE NOT lab IN ['__Entity__', '__KGBuilder__']
WITH lab, collect({{ id: id(entity), {props_map} }}) AS labelCluster
WITH lab, collect({{ id: elementId(entity), {props_map} }}) AS labelCluster
RETURN lab, labelCluster
"""

Expand Down Expand Up @@ -260,10 +260,10 @@ async def run(self) -> ResolutionStats:
for node_id_set in merged_sets:
if len(node_id_set) > 1:
merge_query = (
"MATCH (n) WHERE id(n) IN $ids "
"MATCH (n) WHERE elementId(n) IN $ids "
"WITH collect(n) AS nodes "
"CALL apoc.refactor.mergeNodes(nodes, {properties: 'discard', mergeRels: true}) "
"YIELD node RETURN id(node)"
"YIELD node RETURN elementId(node)"
)
result, _, _ = self.driver.execute_query(
merge_query,
Expand Down