It is possible of course. The allShortestPaths
query returns a List
of paths that you can unwind, then for each of them you can reduce
the properties of the relationships :
MATCH paths = allShortestPaths((m)-[r*]-(n))
WHERE m.name = 'x' AND n.name <> 'x'
UNWIND paths AS path
WITH n.name AS name,
reduce(total = 0, rel IN relationships(path) | total + rel.y) AS total
RETURN name, min(total)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…