Neo 4 J
Neo 4 J
Neo4j
Match ( p1: Person { name: “Tom Cruise” }), ( p2: Person { name: “Keanu
Revees” } ), path = shortestPath ( (p1) – [*..15] - (p2) )
Return p, length(p)
2. How long is the shortest path between Keanu Reeves and Tom
Cruise?
Match ( p1: Person { name: “Tom Cruise” } ), ( p2: Person { name: “Keanu
Revees” ) ), path = shortestPath ( (p1) – [*..15] - (p2) )
Return p, count(p)
3. What are the shortest paths between people with first name Keanu
and people with first name Tom?