Skip to content

Instantly share code, notes, and snippets.

@stackdump
Created April 17, 2015 19:45
Show Gist options
  • Save stackdump/78daad95b661466c913a to your computer and use it in GitHub Desktop.
Save stackdump/78daad95b661466c913a to your computer and use it in GitHub Desktop.
neo4j-sh (?)$ MATCH (p0:Page {title:'Neo4j'}), (p1:Page {title:'Kevin Bacon'}),
> p = shortestPath((p0)-[*..6]-(p1))
> RETURN p
> ;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| p |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [Node[6831172]{title:"Neo4j"},:Link[83114204]{},Node[5350170]{title:"San Francisco Bay Area"},:Link[71148851]{},Node[327060]{title:"Barack Obama"},:Link[969118]{},Node[10735]{title:"Kevin Bacon"}] |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row
117112 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment