Skip to content

Instantly share code, notes, and snippets.

@ngopal
Created February 22, 2014 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngopal/9163968 to your computer and use it in GitHub Desktop.
Save ngopal/9163968 to your computer and use it in GitHub Desktop.
a simple cypher query to find all of the shortest paths in the neo4j shell
START source=node(10), destination=node(144)
MATCH p = allShortestPaths(source-[r:interacts*..3]->destination)
RETURN NODES(p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment