Skip to content

Commit f633c3d

Browse files
committed
Cypher: Fix Q14's formulation
1 parent 2f35b5a commit f633c3d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cypher/queries/interactive-complex-14.cypher

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ MATCH
1313
path = shortestPath((person1)-[:KNOWS*]-(person2))
1414

1515
// ----------------------------------------------------------------------------------------------------
16-
WITH path
16+
WITH person1, person2
17+
// ----------------------------------------------------------------------------------------------------
18+
19+
CALL gds.graph.drop('q14graph', false)
20+
YIELD graphName
21+
22+
// ----------------------------------------------------------------------------------------------------
23+
WITH person1, person2
1724
// ----------------------------------------------------------------------------------------------------
1825

1926
CALL gds.graph.project.cypher(
@@ -35,10 +42,9 @@ CALL gds.graph.project.cypher(
3542
YIELD graphName
3643

3744
// ----------------------------------------------------------------------------------------------------
38-
WITH count(*) AS dummy
45+
WITH person1, person2
3946
// ----------------------------------------------------------------------------------------------------
4047

41-
MATCH (person1:Person {id: $person1Id}), (person2:Person {id: $person2Id})
4248
CALL gds.shortestPath.dijkstra.stream(
4349
'q14graph', {sourceNode: person1, targetNode: person2, relationshipWeightProperty: 'weight'}
4450
)

0 commit comments

Comments
 (0)