![](/img/trans.png)
[英]Unable to create relationship between two nodes in Neo4J database using Cypher query in Java
[英]Create a path between two nodes through another node using cypher command in neo4j?
比如我有三个节点a、b、c。 我想通过节点 b 在节点 a 和 c 之间创建一条路径(不是关系)。 我参考了一些官方文档,但找不到确切的查询。
我提到的 https://neo4j.com/docs/cypher-manual/current/clauses/create/#create-create-a-full-path
我认为这可能是您正在寻找的内容: https://neo4j.com/labs/apoc/4.2/overview/apoc.nodes/apoc.nodes.link/ 。 这将获取一个节点列表并在它们之间创建关系以为您提供路径。
您也可以使用 Cypher 执行此操作,但它有点麻烦。 这里有一篇知识库文章展示了每种方法: https://neo4j.com/developer/kb/creating-and-working-with-linked-lists/ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.