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: docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md
+37-4
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The `FIND PATH` statement finds the paths between the selected source vertices a
9
9
## Syntax
10
10
11
11
```ngql
12
-
FIND { SHORTEST | ALL | NOLOOP } PATH [WITH PROP] FROM <vertex_id_list> TO <vertex_id_list>
12
+
FIND { SHORTEST | SINGLE SHORTEST | ALL | NOLOOP } PATH [WITH PROP] FROM <vertex_id_list> TO <vertex_id_list>
13
13
OVER <edge_type_list> [REVERSELY | BIDIRECT]
14
14
[<WHERE clause>] [UPTO <N> {STEP|STEPS}]
15
15
YIELD path as <alias>
@@ -19,7 +19,9 @@ YIELD path as <alias>
19
19
[vertex_id [, vertex_id] ...]
20
20
```
21
21
22
-
-`SHORTEST` finds the shortest path.
22
+
-`SHORTEST` finds all the shortest path.
23
+
24
+
-`SINGLE SHORTEST` finds the all shortest path. If there are multiple shortest paths, only one path is returned.
23
25
24
26
-`ALL` finds all the paths.
25
27
@@ -35,9 +37,11 @@ YIELD path as <alias>
35
37
36
38
-`<WHERE clause>` filters properties of edges.
37
39
38
-
-`<N>` is the maximum hop number of the path. The default value is `5`.
40
+
-`UPTO <N> {STEP|STEPS}` is the maximum hop number of the path. The default value is `5`.
41
+
42
+
-`ORDER BY $-.path` specifies the order of the returned paths. For information about the order rules, see [Path](https://github.com/vesoft-inc/nebula/blob/{{nebula.branch}}/src/common/datatypes/Path.h#L86).
39
43
40
-
-`<M>` specifies the maximum number of rows to return.
44
+
-`LIMIT <M>` specifies the maximum number of rows to return.
41
45
42
46
!!! note
43
47
@@ -75,6 +79,35 @@ nebula> FIND SHORTEST PATH WITH PROP FROM "team204" TO "player100" OVER * REVERS
0 commit comments