如何在Neo4j Apoc mergeNodes中的合并节点上更新纬度和经度?

时间:2019-11-26 11:33:59

标签: neo4j neo4j-apoc

我正在尝试查找合并的所有节点的平均值,并将其更新为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

0 个答案:

没有答案