You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/patterns/shortest-paths.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -779,7 +779,7 @@ ready to start consuming query after 40 ms, results consumed after another 331 m
779
779
780
780
If the query is rewritten with a `CALL` subquery the planner will use `StatefulShortestPath(Into)` which performs separate traversals for each individual source-target node pairs.
781
781
782
-
.Multi-target shortest path query rewritten with a CALL subquery
782
+
.Multi-target shortest path query rewritten with a `CALL` subquery
783
783
[source, cypher]
784
784
----
785
785
PROFILE
@@ -840,8 +840,8 @@ a| Used when:
840
840
841
841
* The xref:patterns/reference.adoc#shortest-functions[`shortestPath()` or `allShortestPaths()`] functions are used.
842
842
843
-
Or, if the planner estimates a single source-target node pair and the following are all true:
844
-
843
+
Or, when the estimated cardinality of the source and target nodes in a shortest path are 1 or less and the following are all true:
844
+
845
845
* Selector is one of: `SHORTEST 1`, `ANY`, `ANY SHORTEST`, `ALL SHORTEST`, `SHORTEST GROUP`, or `SHORTEST 1 GROUP`.
846
846
* There is only one relationship pattern.
847
847
* If the pattern is a xref:patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path pattern] in the form of `\(()-[]-())`, or is a xref:patterns/variable-length-patterns.adoc#quantified-relationship[quantified-relationship], and it uses a filter that can be applied directly to the relationship.
@@ -850,7 +850,7 @@ Or, if the planner estimates a single source-target node pair and the following
850
850
| `StatefulShortestPath(Into)`
851
851
| Performs bidirectional BFS from target and source node.
852
852
Terminates when a shortest path is found between them.
853
-
a| Used when the planner estimates a single source-target node pair in a shortest path and either of the following are true:
853
+
a| Used when the estimated cardinality of the source and target nodes in a shortest path are 1 or less and either of the following are true:
854
854
855
855
* Selector is one of: `ANY/SHORTEST k` or `SHORTEST k GROUPS` and `k` is larger than `1`.
0 commit comments