diff --git a/modules/ROOT/pages/patterns/reference.adoc b/modules/ROOT/pages/patterns/reference.adoc index f75ac88c9..af68fc22a 100644 --- a/modules/ROOT/pages/patterns/reference.adoc +++ b/modules/ROOT/pages/patterns/reference.adoc @@ -1372,6 +1372,7 @@ They are similar to `SHORTEST 1` and `ALL SHORTEST`, but with several difference * The path pattern is passed as an argument to the functions. * The path pattern is limited to a single relationship pattern. * To return results where the first and last node in the path are the same requires a change to the configuration setting link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/configuration-settings/#config_dbms.cypher.forbid_shortestpath_common_nodes[`dbms.cypher.forbid_shortestpath_common_nodes`]. +* The minimum path length, also called the lower bound of the variable length relationship pattern, should be 0 or 1. Both functions will continue to be available, but they are not xref:appendix/gql-conformance/index.adoc[GQL conformant]. @@ -1414,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] @@ -1427,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))