路径长度大于1的情况下如何返回各个路径上所有的节点的值
2 回复
解析N度路径的信息可以参考下面的实现:
MATCH p=()-[:R*3]->() WITH p LIMIT 10
WITH RELATIONSHIPS(p) AS rels
UNWIND rels AS rel
WITH STARTNODE(rel) AS start,rel,ENDNODE(rel) AS end
RETURN ID(start) AS startId,LABELS(start) AS startLabel,PROPERTIES(start) AS startPros,ID(rel) AS relId,TYPE(rel) AS relType,PROPERTIES(rel) AS relPros,ID(end) AS endId,LABELS(end) AS endLabel,PROPERTIES(end) AS endPros