Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;TransactionFailureException:无法提交事务“;使用cypher shell控制台删除neo4j中的节点/关系时出错_Neo4j_Cypher - Fatal编程技术网

&引用;TransactionFailureException:无法提交事务“;使用cypher shell控制台删除neo4j中的节点/关系时出错

&引用;TransactionFailureException:无法提交事务“;使用cypher shell控制台删除neo4j中的节点/关系时出错,neo4j,cypher,Neo4j,Cypher,我在shell控制台中执行此命令时遇到此错误(我只想从图中删除超级节点,因为它们会影响我的建议): 直接删除节点时也会出现相同的错误(后来我意识到必须先删除它们的关系)。当执行相同的查询,但将DELETE命令替换为RETURN EVERY时: cypher 1.9 start n=node:node_auto_index('n_id_customer:*') match n--r with n,count(*) as cnt where cnt > 5000 with n match n-

我在shell控制台中执行此命令时遇到此错误(我只想从图中删除超级节点,因为它们会影响我的建议):

直接删除节点时也会出现相同的错误(后来我意识到必须先删除它们的关系)。当执行相同的查询,但将DELETE命令替换为RETURN EVERY时:

cypher 1.9 start n=node:node_auto_index('n_id_customer:*') match n--r with n,count(*) as cnt where cnt > 5000 with n match n--r2 with r2 return  count(r2); 
+-----------+
| count(r2) |
+-----------+
| 181294    |
+-----------+
1 row
20615 ms
neo4j版本是1.9。 我如何才能正确、轻松地删除/消除超级节点,使它们不会影响整个图形?删除他们的关系也就足够了。

别担心,我错了

match子句n--r在两侧都提供节点,因此当仍然有rel时不能删除节点。更改为匹配n-[r]()有效。

别担心,我错了


match子句n--r在两侧都提供节点,因此当仍然有rel时不能删除节点。更改为匹配n-[r]-()有效。

即使尝试删除单个节点的所有关系,也会出现以下错误:start n=node(9)MATCH n--r delete r;TransactionFailureException:无法提交transactioneven当我尝试删除单个节点的所有关系时,我收到了以下错误:start n=节点(9)匹配n--r delete r;TransactionFailureException:无法提交事务
cypher 1.9 start n=node:node_auto_index('n_id_customer:*') match n--r with n,count(*) as cnt where cnt > 5000 with n match n--r2 with r2 return  count(r2); 
+-----------+
| count(r2) |
+-----------+
| 181294    |
+-----------+
1 row
20615 ms