diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md index a1ea5fc753d..31cd463fa3a 100644 --- a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql-command.md @@ -238,7 +238,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] @@ -420,8 +420,8 @@ | 类型 | 语法 | 示例 | 说明 | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [子图](../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` | 指定 Edge type 的起始点可以到达的点和边的信息,返回子图信息。 | -| [路径](../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` | 查找指定起始点和目的点之间的路径。返回的路径格式类似于`()-[:@]->( {STEP|STEPS}] FROM {, ...} [{IN | OUT | BOTH} , ...] YIELD [VERTICES AS ] [,EDGES AS ] ` | `GET SUBGRAPH 1 STEPS FROM "player100" YIELD VERTICES AS nodes, EDGES AS relationships` | 指定 Edge type 的起始点可以到达的点和边的信息,返回子图信息。 | +| [路径](../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` | 查找指定起始点和目的点之间的路径。返回的路径格式类似于`()-[:@]->( 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 abcb432a0ae..b8e8805cc1d 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 @@ ```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 77657ccca98..cc62d504d5b 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 @@ ## 语法 ```ngql -GO [[ TO] STEPS ] FROM +GO [[ TO] {STEP|STEPS} ] FROM OVER [{REVERSELY | BIDIRECT}] [ WHERE  ] YIELD [DISTINCT] @@ -29,9 +29,9 @@ YIELD [DISTINCT] [AS ] [, [AS ] ...] ``` -- ` STEPS`:指定跳数。如果没有指定跳数,默认值`N`为`1`。如果`N`为`0`,NebulaGraph 不会检索任何边。 +- ` {STEP|STEPS}`:指定跳数。如果没有指定跳数,默认值`N`为`1`。如果`N`为`0`,NebulaGraph 不会检索任何边。 -- `M TO N STEPS`:遍历`M~N`跳的边。如果`M`为`0`,输出结果和`M`为`1`相同,即`GO 0 TO 2`和`GO 1 TO 2`是相同的。 +- `M TO N {STEP|STEPS}`:遍历`M~N`跳的边。如果`M`为`0`,输出结果和`M`为`1`相同,即`GO 0 TO 2`和`GO 1 TO 2`是相同的。 - ``:用逗号分隔的点 ID 列表,或特殊的引用符`$-.id`。详情参见[管道符](../5.operators/4.pipe.md)。 diff --git a/docs-2.0/reuse/source_ngql_for_quick_start.md b/docs-2.0/reuse/source_ngql_for_quick_start.md index fad3dad5b8d..f65d5157fe7 100644 --- a/docs-2.0/reuse/source_ngql_for_quick_start.md +++ b/docs-2.0/reuse/source_ngql_for_quick_start.md @@ -237,7 +237,7 @@ nebula> CREATE EDGE serve(start_year int, end_year int); - `GO` ```ngql - GO [[ TO] STEPS ] FROM + GO [[ TO] {STEP|STEPS}] FROM OVER [{REVERSELY | BIDIRECT}] [ WHERE ] YIELD [DISTINCT]