首页 > 其他 > 详细

Neo4j

时间:2019-01-30 23:00:54      阅读:222      评论:0      收藏:0      [点我收藏+]

  

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

原文:https://www.cnblogs.com/baiyunwanglai/p/10285694.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!