I want to return one row for each segment in a path. This is the Cypher code I've devised so far. There must be a better way.
match ... --> (i:IMAGE) match p = (i)-[*]->(f:IMAGE) where NOT (f)-->(:IMAGE) with nodes(p) as q with [[q,q], [q,q], [q,q], [q,q], [q,q], [q,q]] as tuples unwind tuples as seg return seg.name as from, seg.name as to
My biggest problem is that it only goes six levels deep. Another inconvenience is that it returns lots of null rows for shallow paths.