diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md index 27337fe6af0..6b012f47f9f 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md @@ -480,16 +480,16 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) -[*0]-> (v2) \ ### Match variable-length paths -You can use the `:*[minHop]..` pattern to match variable-length paths. +You can use the `:*[minHop]..[maxHop]` pattern to match variable-length paths. |Parameter|Description| |-|-| |`minHop`|Optional. It represents the minimum length of the path. `minHop` must be a non-negative integer. The default value is 1.| -|`maxHop`|Required. It represents the maximum length of the path. `maxHop` must be a non-negative integer. It has no default value.| +|`maxHop`|Optional. It represents the maximum length of the path. `maxHop` must be a non-negative integer. It has no default value.| !!! compatibility "OpenCypher compatibility" - In openCypher, `maxHop` is optional and defaults to infinity. When no bounds are given, `..` can be omitted. However, in nGQL, `maxHop` is required. And `..` cannot be omitted. + In openCypher, when `minHop` is not set, `..` can be omitted. However, in nGQL, `..` cannot be omitted. ```ngql nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) \