Reputation: 11819
Is this cypher-query correct? I am trying to find the shortest path between two nodes based on the node-IDs:
MATCH (martin:RoadNode {id:16814}),(oliver:RoadNode {id:16820}),
p = shortestPath((martin)-[*..15]-(oliver))
RETURN p
It does execute without error, but it returns 0 rows, although I expect it to find a path.
Upvotes: 3
Views: 10869
Reputation: 11819
I have found it! In order to find the shortest path between to nodes based on their IDs, this cypher-query does the trick:
MATCH (martin:RoadNode),(oliver:RoadNode),
p = shortestPath((martin)-[*..15]-(oliver))
WHERE id(martin) = 16814 AND id(oliver) = 16820
RETURN p
Upvotes: 10