Skip to content

Commit

Permalink
Remove the upper limitation of path length (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-lzy authored Mar 17, 2022
1 parent 41be587 commit 3bfe527
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,16 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) -[*0]-> (v2) \

### Match variable-length paths

You can use the `:<edge_type>*[minHop]..<maxHop>` pattern to match variable-length paths.
You can use the `:<edge_type>*[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) \
Expand Down

0 comments on commit 3bfe527

Please sign in to comment.