Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the upper limitation of path length #1150

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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