2012-03-23 57 views

回答

7

随着Neography,你可以给这个小鬼脚本:

@neo = Neography::Rest.new 
@neo.execute_script("g.clear()") 

删除所有的节点和关系。

+0

只设置有机会来验证这种解决方案;谢谢! – 2012-03-26 13:05:50

0

以清除除根节点的所有节点和关系,使用neography wiki

@neo = Neography::Rest.new 
@neo.execute_query("START n0=node(0),nx=node(*) MATCH n0-[r0?]-(),nx-[rx?]-() WHERE nx <> n0 DELETE r0,rx,nx") 
相关问题