neo4j - 升级到 neo4j 2.1 破坏了 Cypher 查询

标签 neo4j upgrade cypher

较新版本的 Cypher 不再喜欢我的 OPTIONAL MATCH 子句。
Cypher 2.1 的此查询的正确版本是什么?

Cannot add labels or properties on a node which is already bound (line 1, column 104)
"MATCH (n1:Entity {key:"bloomberg michael"})-[r1:RELATED_TO]-(n2:Entity) 
 WITH n1, r1, n2 
 OPTIONAL MATCH (n2:Entity)-[r2:RELATED_TO]-(n3:Entity) 
 RETURN n1, r1, n2, count(n3), labels(n1), labels(n2) 
 ORDER BY n2.relevance DESC  
 LIMIT 50"

最佳答案

你能试一下吗

MATCH (n1:Entity {key:"bloomberg michael"})-[r1:RELATED_TO]-(n2:Entity) 
 WITH n1, r1, n2 
 OPTIONAL MATCH (n2)-[r2:RELATED_TO]-(n3:Entity) 
 RETURN n1, r1, n2, count(n3), labels(n1), labels(n2) 
 ORDER BY n2.relevance DESC  
 LIMIT 50

关于neo4j - 升级到 neo4j 2.1 破坏了 Cypher 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24195879/

相关文章:

java - Neo4J OGM Session.load(ID) 返回现有 ID 的 null 对象

neo4j - Neo4j 密码中的三元运算符/默认值

hadoop - 从Map Reduce填充Neo4j中的数据

iOS 应用程序升级后无法启动

linux - Neo4j 警告 : Max 1024 open files allowed, 建议至少 40 000。请参阅 Neo4j 手册

python - 在 Anaconda 上升级到 scikit-learn 的开发版本?

java - Tomcat 升级

随着 SKIP 在 Cypher 查询 + REST API 上增加,Neo4j 延迟增加

Neo4J 加载 CSV -> URI 不是分层的

neo4j - 嵌套 apoc 迭代与 apoc load jdbc 返回 "cannot conclude with CALL"消息