reduce上的neo4j语法错误
我正在使用Neo4j 2.1.3,试图在两个节点之间获得最短路径。我使用这个密码:reduce上的neo4j语法错误,neo4j,cypher,Neo4j,Cypher,我正在使用Neo4j 2.1.3,试图在两个节点之间获得最短路径。我使用这个密码: start a=node(10118), b=node(10141) match p=a-[r*2..5]->b with p, relationships(p) as rcoll return p, reduce(totalTime=0, x in rcoll: totalTime + x.time) as totalTime order by totalTime 但我看到“Neo.ClientErro
start a=node(10118), b=node(10141)
match p=a-[r*2..5]->b
with p, relationships(p) as rcoll
return p, reduce(totalTime=0, x in rcoll: totalTime + x.time) as totalTime
order by totalTime
但我看到“Neo.ClientError.Statement.InvalidSyntax”指向“reduce”这个词。知道怎么了吗
谢谢 尝试将:替换为| 像这样:
start a=node(10118), b=node(10141)
match p=a-[r*2..5]->b
with p, relationships(p) as rcoll
return p, reduce(totalTime=0, x in rcoll | totalTime + x.time) as totalTime
order by totalTime