标签:nodelist with turn foreach gen neo4j lan HERE nbsp
MATCH (p)-[r1]-(q),(m)-[r2]-(n)
where startNode(r1)=startNode(r2) and type(r1)=type(r2) and EndNode(r1)=EndNode(r2) and not id(r1)=id(r2)
return p,q,m,n
MATCH (n:Tag) WITH n.name AS name, COLLECT(n) AS nodelist, COUNT(*) AS count WHERE count > 1 CALL apoc.refactor.mergeNodes(nodelist) YIELD node RETURN node
MATCH (p)-[r1]-(q),(m)-[r2]-(n)
where startNode(r1)=startNode(r2) and EndNode(r1)=EndNode(r2) and type(r1)=type(r2) and id(r1)<id(r2)
with distinct id(r1) as r1,collect(r2) as elist
foreach(k in elist|delete k )
标签:nodelist with turn foreach gen neo4j lan HERE nbsp
原文地址:https://www.cnblogs.com/baiyunwanglai/p/10285694.html