From 1ac6a74ceab3c2a7b335e32742f767ad17c7da91 Mon Sep 17 00:00:00 2001 From: dogofbrian Date: Thu, 9 Jan 2025 14:16:14 +0000 Subject: [PATCH 1/2] Fix examples in Patterns / Syntax and semantics / shortestPaths --- modules/ROOT/pages/patterns/reference.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/patterns/reference.adoc b/modules/ROOT/pages/patterns/reference.adoc index d9da89346..e47a1a458 100644 --- a/modules/ROOT/pages/patterns/reference.adoc +++ b/modules/ROOT/pages/patterns/reference.adoc @@ -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]] From 42b3d1c52093b3a5a68e9cdcac5188017f4c2a8f Mon Sep 17 00:00:00 2001 From: dogofbrian Date: Thu, 9 Jan 2025 14:21:20 +0000 Subject: [PATCH 2/2] Improve header to Rules of shortestPath --- modules/ROOT/pages/patterns/reference.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/patterns/reference.adoc b/modules/ROOT/pages/patterns/reference.adoc index e47a1a458..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.