我可以在neo4j中找到两个节点之间的所有关系吗? [英] Can I find all the relations between two nodes in neo4j?
本文介绍了我可以在neo4j中找到两个节点之间的所有关系吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一组以下列方式相关的节点:
I have a group of nodes which are related in the following way:
A --> B --> C --> D
该关系是具有某些 id 属性的连接"关系.我的问题是:我能否编写一个密码查询,该查询将向我显示从起始节点 A 到起始节点 D 的每个关系的所有 id 属性,而不在查询中提及其间的任何节点.
The relation is a "connected with" relationship with some id property. My question is: Can I write a cypher query which will show me all the id properties of each relationship from start node A to the start node D without mentioning in the query any of the nodes in between.
谢谢迪米特里斯
推荐答案
也许您正在寻找 可变长度关系:
MATCH (a:A { name:"Some property" })-[r:connected_with*1..4]-(x)
RETURN r, x
这篇关于我可以在neo4j中找到两个节点之间的所有关系吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文