简体   繁体   English

使用密码查询语言在neo4j中找到起始节点和结束节点之间的所有可能路径

[英]find all the possible path between a start node and end node in neo4j using cypher query language

I have multiple nodes and many different relationship between 2 nodes ie the start node and end node.我有多个节点和 2 个节点之间的许多不同关系,即开始节点和结束节点。 I want to find all the possible path between a start node and end node in neo4j using cypher query language我想使用密码查询语言在neo4j中找到开始节点和结束节点之间的所有可能路径

I think you'll find the MATCH documentation helpful here, especially variable-length relationships .我认为您会发现MATCH 文档在这里很有帮助,尤其是可变长度关系

An example:一个例子:

MATCH path = (start:Label1{id:12345})-[*]-(end:Label2{id:67890})
RETURN path

Be aware that highly connected graphs may have trouble if you do not add an upper limit to the size of the paths.请注意,如果您不为路径的大小添加上限,则高度连接的图可能会出现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM