简体   繁体   English

cypher 查询将特定关系类型的所有节点匹配到特定节点

[英]cypher query to match all nodes of a specific relationship type to a specific node

I have a node type of Author and a node type of Articles我有Author节点类型和Articles节点类型

Author has a relationship type of WROTE which links it to articles that it has written. Author有一个WROTE关系类型,它将它链接到它所写的文章。

I would like to get all articles that have been written by an author with a specific uuid.我想获取具有特定 uuid 的作者所写的所有文章。

MATCH (n:Author {uuid: '8f47fb1d-2a3f-46a8-b0fc-06b24169ac86'})<-[:WROTE]-(Article) RETURN Article

is what I am trying, but it is coming back with (no changes, no records)是我正在尝试的,但它回来了(no changes, no records)

I'm guessing here, but the direction of your relationship seems off.我在这里猜测,但你们关系的方向似乎不对。 You also want to provide the type (ie "label") of your article node:您还想提供文章节点的类型(即“标签”):

MATCH (n:Author {uuid: '8f47fb1d-2a3f-46a8-b0fc-06b24169ac86'})-[:WROTE]->(a:Article)
RETURN a

For exploring your data and if you do not know the direction, you can match relationships while ignoring the direction:为了探索你的数据,如果你不知道方向,你可以在忽略方向的情况下匹配关系:

MATCH (n:Author {uuid: '8f47fb1d-2a3f-46a8-b0fc-06b24169ac86'})-[:WROTE]-(a:Article)
RETURN a

暂无
暂无

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

相关问题 Cypher 查询:如果它们与特定属性共享关系,则匹配所有节点对 - Cypher query: match all the couples of nodes iff they share a relationship with a specific property Neo4j cypher查询以获取与特定其他节点无关的所有节点 - Neo4j cypher query to get all nodes without a relationship to specific other node Neo4j Cypher Query 获取所有子节点,直到到达具有特定关系的节点 - Neo4j Cypher Query to get all sub nodes until reaching a node with a specific relationship Cypher:获取具有特定关系的节点的所有关系 - Cypher: get all the relationships of node with a specific relationship 密码查询可遍历特定类型的所有节点以及与组相关的节点 - Cypher query to iterate through all nodes of a specific type and group related nodes 获取连接到具有关系的特定节点的所有节点 - Get the all the nodes connected to a specific node with relationship Cypher根据特定关系连接匹配的节点 - Cypher to connect matched nodes based on specific relationship Cypher 查询每个节点具有的特定类型关系的数量,包括其子节点中的相同类型关系 - Cypher query to count the number of relationships of specific type that each node has, including same type relationships in their sub-nodes 密码查询在特定节点上冻结 - Cypher query freezes on specific node Neo4J / Cypher需要帮助编写查询,以显示通过特定数量的路径连接到初始节点的所有结果节点 - Neo4J / Cypher need hel writing a query that shows all the result nodes that connect to an initial node by a specific number of paths
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM