Skip to content

Commit

Permalink
Add lower bound restriction of shortestPath() and allShortestPath() t…
Browse files Browse the repository at this point in the history
…o the rules section
  • Loading branch information
WilcoNeo committed Jan 10, 2025
1 parent d25c1ba commit 946efca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/ROOT/pages/patterns/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ shortestPath((:A)-->+(:B))
[[shortest-functions-rules-path-pattern-length]]
==== Path pattern length

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

.Allowed
[source]
Expand All @@ -1428,6 +1428,8 @@ shortestPath((a)-[:R*1..5]-(b))
----
shortestPath((a)-[:R*1..5]-(b)-->(:X))
shortestPath((a)-[:R*2..5]-(b))
shortestPath((:A))
allShortestPaths((a:A)-[:S*]->(:B), (a)-[:R*1..3]->(:C))
Expand Down

0 comments on commit 946efca

Please sign in to comment.