1
查詢,在V2.0.3工作現在升級到Neo4j的V2.1.2後,Cypher支架查詢不起作用
START n = NODE(67635)
MATCH (n:publication)
WHERE n.status <> 0
OPTIONAL MATCH (n)-[re:contains|can_use]->(e)
WHERE (e:article) AND (e.status <> 0 AND re.status <> 0)
WITH n, e
ORDER BY e.created DESC
WITH n, COLLECT(e) AS ce
RETURN n, ce[0..10], LENGTH(ce)
,在V2.1.2我得到了同樣的查詢以下錯誤:
Cannot match on a pattern containing only already bound identifiers (line 2, column 1)\n\"MATCH (n:publication)\"\n ^\n [exception] => SyntaxException\n [fullname] => org.neo4j.cypher.SyntaxException\n [stacktrace] => Array\n (\n [0] => org.neo4j.cypher.internal.compiler.v2_1.SemanticChecker$$anonfun$check$1.apply(SemanticChecker.scala:40)\n [1] => org.neo4j.cypher.internal.compiler.v2_1.SemanticChecker$$anonfun$check$1.apply(SemanticChecker.scala:40)\n
我知道如何解決它,但我想避免在整個項目中修復查詢,如果可能的話。 任何其他解決方案?