-
Notifications
You must be signed in to change notification settings - Fork 91
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
modify maxHop #1661
modify maxHop #1661
Conversation
@@ -239,7 +239,7 @@ | |||
| 匹配多个 Edge type | `MATCH (v:player{name:"Tim Duncan"})-[e:follow | :serve]->(v2) RETURN e` | 使用`|`可以匹配多个 Edge type,例如`[e:follow | :serve]`。第一个 Edge type 前的英文冒号(:)不可省略,后续 Edge type 前的英文冒号可以省略,例如`[e:follow | serve]`。 | | |||
| 匹配多条边 | `MATCH (v:player{name:"Tim Duncan"})-[]->(v2)<-[e:serve]-(v3) RETURN v2, v3` | 用户可以扩展模式,匹配路径中的多条边。 | | |||
| 匹配定长路径 | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*2]->(v2) RETURN DISTINCT v2 AS Friends` | 用户可以在模式中使用`:<edge_type>*<hop>`匹配定长路径。`hop`必须是一个非负整数。`e`的数据类型是列表。 | | |||
| 匹配变长路径 | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) RETURN v2 AS Friends` | `minHop`:可选项。表示路径的最小长度。`minHop`必须是一个非负整数,默认值为 1。<br>`maxHop`:必选项。表示路径的最大长度。`maxHop`必须是一个非负整数,没有默认值。`e`的数据类型是列表。 | | |||
| 匹配变长路径 | `MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) RETURN v2 AS Friends` | `minHop`:可选项。表示路径的最小长度。`minHop`必须是一个非负整数,默认值为 1。<br>`maxHop`:可选项。表示路径的最大长度。`maxHop`必须是一个非负整数,默认为无穷大。`e`的数据类型是列表。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not good...
|
||
!!! caution | ||
|
||
如果未设置 `maxHop` 可能会导致 graph 服务 OOM,请谨慎执行该命令。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..]->(v2) \ | ||
RETURN v2 AS Friends; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果用户没注意前面的caution,直接拿这个例子去改,可能会oom。所以我们是不是考虑不要放这个例子?
No description provided.