我正在尝试查找合并的所有节点的平均值,并将其更新为merged(new)节点。如果有人可以建议我最好的方法,我将不胜感激。
MATCH (n1:RoadPoint)-[r1:ROAD_SEGMENT]-(n2:RoadPoint) WITH n1, COUNT(DISTINCT n2) AS c WHERE c = 2 MATCH (n1)-[r1:ROAD_SEGMENT]-(n2) WITH collect(n2) as nodes CALL apoc.refactor.mergeNodes(nodes, {properties: {lat:'overwrite', lon:'overwrite', osmid:'overwrite'}}) YIELD node return node