Neo4j p已声明错误

Neo4j p已声明错误,neo4j,cypher,Neo4j,Cypher,我正在运行以下查询: START root=node:people(id="$personOrFamilyId"), descendant=node:people(id="$descendant") MATCH p=shortestPath(root-[p:child|descendant*..25]->descendant) RETURN EXTRACT( n in nodes(p) : n.id ) as node_ids_on_path 并获得以下错误: p already d

我正在运行以下查询:

START root=node:people(id="$personOrFamilyId"), descendant=node:people(id="$descendant") 
MATCH p=shortestPath(root-[p:child|descendant*..25]->descendant) 
RETURN EXTRACT( n in nodes(p) : n.id ) as node_ids_on_path
并获得以下错误:

p already declared

它在1.9中运行,但在2.0中失败了。我遗漏了什么?

您正在对来自最短路径的路径以及模式内部的关系标识符重用标识符
p

START root=node:people(id="$personOrFamilyId"), descendant=node:people(id="$descendant") 
MATCH p=shortestPath(root-[:child|descendant*..25]->descendant) 
RETURN EXTRACT( n in nodes(p) | n.id ) as node_ids_on_path
现在我明白了:提取(…)需要“|表达式”(提取表达式)啊,的确如此。遗漏了这一点——提取函数现在需要一个管道。