Neo4j
Posted baiyunwanglai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Neo4j相关的知识,希望对你有一定的参考价值。
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 )
以上是关于Neo4j的主要内容,如果未能解决你的问题,请参考以下文章