diff --git a/modules/ROOT/pages/patterns/reference.adoc b/modules/ROOT/pages/patterns/reference.adoc index d9da89346..f75ac88c9 100644 --- a/modules/ROOT/pages/patterns/reference.adoc +++ b/modules/ROOT/pages/patterns/reference.adoc @@ -1399,7 +1399,7 @@ Note that it is possible to pass a fixed length path pattern (with a single rela === Rules [[shortest-functions-rules-var-length-restriction]] -==== Restricted to variable length +==== Restricted to variable-length relationships The pattern in the path selector function must be a variable-length relationship and not a quantified path pattern. @@ -1470,14 +1470,14 @@ Return a single shortest path for each distinct pair of nodes matching `(:A)` an [source, role=noheader] ---- -MATCH shortestPath((:A)-[:R]->{0,10}(:B)) +MATCH shortestPath((:A)-[:R*0..10]->(:B)) ---- Return all paths equal to the shortest path length for each distinct pair of nodes matching `(:A)` and `(:B)`: [source, role=noheader] ---- -MATCH allShortestPaths((:A)-[:R]->{0,10}(:B)) +MATCH allShortestPaths((:A)-[:R*0..10]->(:B)) ---- [[graph-patterns]]