Skip to content

Commit 946efca

Browse files
committed
Add lower bound restriction of shortestPath() and allShortestPath() to the rules section
1 parent d25c1ba commit 946efca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/ROOT/pages/patterns/reference.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ shortestPath((:A)-->+(:B))
14151415
[[shortest-functions-rules-path-pattern-length]]
14161416
==== Path pattern length
14171417

1418-
There must be exactly one relationship pattern in the path pattern.
1418+
There must be exactly one relationship pattern in the path pattern, and the lower bound should be 0 or 1.
14191419

14201420
.Allowed
14211421
[source]
@@ -1428,6 +1428,8 @@ shortestPath((a)-[:R*1..5]-(b))
14281428
----
14291429
shortestPath((a)-[:R*1..5]-(b)-->(:X))
14301430
1431+
shortestPath((a)-[:R*2..5]-(b))
1432+
14311433
shortestPath((:A))
14321434
14331435
allShortestPaths((a:A)-[:S*]->(:B), (a)-[:R*1..3]->(:C))

0 commit comments

Comments
 (0)