How do I perform the functions of shortestPath()
and allShortestPaths()
in py2neo?
In Cypher, I'd execute something like:
START beginning=node(4), end=node(452)
MATCH p = shortestPath(beginning-[*..500]-end)
RETURN p
I've tried what I thought was the equivalent (below), but this doesn't work (these relationships work in cypher, and the node_* objects are indeed the correct nodes
>>> rels = list(graph_db.match(start_node=node_4, end_node=node_452))
>>> rels
[]