diff --git a/docs-2.0/2.quick-start/4.nebula-graph-crud.md b/docs-2.0/2.quick-start/4.nebula-graph-crud.md index 81294382fc0..bf5ccd700c5 100644 --- a/docs-2.0/2.quick-start/4.nebula-graph-crud.md +++ b/docs-2.0/2.quick-start/4.nebula-graph-crud.md @@ -238,7 +238,7 @@ You can use the `INSERT` statement to insert vertices or edges based on existing * `GO` ```ngql - GO [[ TO] STEPS ] FROM + GO [[ TO] {STEP|STEPS} ] FROM OVER [{REVERSELY | BIDIRECT}] [ WHERE ] YIELD [DISTINCT] diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md index 6818a1cd1d8..297bf2d9f2a 100644 --- a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md @@ -237,7 +237,7 @@ * [GO](../3.ngql-guide/7.general-query-statements/3.go.md) ``` - GO [[ TO] STEPS ] FROM + GO [[ TO] {STEP|STEPS} ] FROM OVER [{REVERSELY | BIDIRECT}] [ WHERE ] YIELD [DISTINCT] @@ -418,8 +418,8 @@ | Type | Syntax | Example | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [GET SUBGRAPH](../3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md) | `GET SUBGRAPH [WITH PROP] [ STEPS] FROM {, ...} [{IN | OUT | BOTH} , ...] YIELD [VERTICES AS ] [,EDGES AS ] ` | `GET SUBGRAPH 1 STEPS FROM "player100" YIELD VERTICES AS nodes, EDGES AS relationships` | Retrieves information of vertices and edges reachable from the source vertices of the specified edge types and returns information of the subgraph. | -| [FIND PATH](../3.ngql-guide/16.subgraph-and-path/2.find-path.md) | `FIND { SHORTEST | ALL | NOLOOP } PATH [WITH PROP] FROM TO OVER [REVERSELY | BIDIRECT] [] [UPTO STEPS] YIELD path as [| ORDER BY $-.path] [| LIMIT ]` | `FIND SHORTEST PATH FROM "player102" TO "team204" OVER * YIELD path as p` | Finds the paths between the selected source vertices and destination vertices. A returned path is like `()-[:@]->( {STEP|STEPS}] FROM {, ...} [{IN | OUT | BOTH} , ...] YIELD [VERTICES AS ] [,EDGES AS ] ` | `GET SUBGRAPH 1 STEPS FROM "player100" YIELD VERTICES AS nodes, EDGES AS relationships` | Retrieves information of vertices and edges reachable from the source vertices of the specified edge types and returns information of the subgraph. | +| [FIND PATH](../3.ngql-guide/16.subgraph-and-path/2.find-path.md) | `FIND { SHORTEST | ALL | NOLOOP } PATH [WITH PROP] FROM TO OVER [REVERSELY | BIDIRECT] [] [UPTO {STEP|STEPS}] YIELD path as [| ORDER BY $-.path] [| LIMIT ]` | `FIND SHORTEST PATH FROM "player102" TO "team204" OVER * YIELD path as p` | Finds the paths between the selected source vertices and destination vertices. A returned path is like `()-[:@]->( STEPS] FROM {, ...} +GET SUBGRAPH [WITH PROP] [ {STEP|STEPS}] FROM {, ...} [{IN | OUT | BOTH} , ...] [WHERE [AND ...]] YIELD {[VERTICES AS ] [,EDGES AS ]}; diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md index 081f1d2c8d0..90436d94991 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md @@ -11,7 +11,7 @@ The `FIND PATH` statement finds the paths between the selected source vertices a ```ngql FIND { SHORTEST | ALL | NOLOOP } PATH [WITH PROP] FROM TO OVER [REVERSELY | BIDIRECT] -[] [UPTO STEPS] +[] [UPTO {STEP|STEPS}] YIELD path as [| ORDER BY $-.path] [| LIMIT ]; diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md index 2217bced8e9..1259029371a 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md @@ -9,7 +9,7 @@ This topic applies to native nGQL only. ## Syntax ```ngql -GO [[ TO] STEPS ] FROM +GO [[ TO] {STEP|STEPS}] FROM OVER [{REVERSELY | BIDIRECT}] [ WHERE  ] YIELD [DISTINCT] @@ -29,13 +29,13 @@ YIELD [DISTINCT] [AS ] [, [AS ] ...] ``` -- ` STEPS`: specifies the hop number. If not specified, the default value for `N` is `one`. When `N` is `zero`, NebulaGraph does not traverse any edges and returns nothing. +- ` {STEP|STEPS}`: specifies the hop number. If not specified, the default value for `N` is `one`. When `N` is `zero`, NebulaGraph does not traverse any edges and returns nothing. !!! note The path type of the `GO` statement is `walk`, which means both vertices and edges can be repeatedly visited in graph traversal. For more information, see [Path](../../1.introduction/2.1.path.md). -- `M TO N STEPS`: traverses `from M to N` hops. When `M` is `zero`, the output is the same as that of `M` is `one`. That is, the output of `GO 0 TO 2` and `GO 1 TO 2` are the same. +- `M TO N {STEP|STEPS}`: traverses `from M to N` hops. When `M` is `zero`, the output is the same as that of `M` is `one`. That is, the output of `GO 0 TO 2` and `GO 1 TO 2` are the same. - ``: represents a list of vertex IDs separated by commas, or a special place holder `$-.id`. For more information, see [Pipe](../5.operators/4.pipe.md).