Cypher查询从第2版迁移到第3版neo4j版本

时间:2017-05-03 06:51:36

标签: neo4j cypher

我有基于neo4j,spring boot,spring数据的应用程序,并且必须从neo4j的第2版迁移到第3版。嵌入式neo4j的集成测试失败,对neo4j的查询非常简单,例如

MATCH ()-[r0:`ADDRESS_RELATION`]-() RETURN  r0

此查询与prev version

一起正常工作

更复杂的查询,由spring数据生成,如此

MATCH ()-[r0:`ADDRESS_RELATION`]-()    
WITH r0,startnode(r0) AS n, endnode(r0) AS m   
MATCH p1 = (n)-[*0..1]-()  
WITH r0, COLLECT(DISTINCT p1) AS startPaths, m 
MATCH p2 = (m)-[*0..1]-()   
WITH r0, startPaths, COLLECT(DISTINCT p2) AS endPaths   
WITH ID(r0) AS rId,startPaths + endPaths  AS paths 
UNWIND paths AS p   
RETURN DISTINCT p, rId")

效果很好。

任何帮助将不胜感激。感谢

0 个答案:

没有答案