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 #1541

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 @@ -440,16 +440,16 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) -[*0]-> (v2) \

### 匹配变长路径

用户可以在模式中使用`:<edge_type>*[minHop]..<maxHop>`匹配变长路径。
用户可以在模式中使用`:<edge_type>*[minHop]..[maxHop]`匹配变长路径。

|参数|说明|
|:---|:---|
|`minHop`|可选项。表示路径的最小长度。`minHop`必须是一个非负整数,默认值为 1。|
|`maxHop`|必选项。表示路径的最大长度。`maxHop`必须是一个非负整数,没有默认值。|
|`maxHop`|可选项。表示路径的最大长度。`maxHop`必须是一个非负整数,没有默认值。|

!!! compatibility "openCypher 兼容性"

在 openCypher 中,`maxHop`是可选项,默认为无穷大。当没有设置时,`..`可以省略。在 nGQL 中,`maxHop`是必选项,而且`..`不可以省略。
在 openCypher 中,没有设置`maxHop`时,`..`可以省略。在 nGQL 中,`..`不可以省略。

```ngql
nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) \
Expand Down