Why isnt Tom Hanks returned in this cypher query?

后端 未结 1 1692
时光取名叫无心
时光取名叫无心 2021-01-23 08:34

When running this from the Neo4j movie intro

MATCH (tom:Person {name:\"Tom Hanks\"})-[:ACTED_IN]->(m)<-[:ACTED_IN]-(coActors) RETURN coActors.name
<         


        
相关标签:
1条回答
  • 2021-01-23 08:57

    Relationships that are matched multiple times in a single pattern will not be included. (tom)-[:ACTED_IN]->(m) on the left matches the ACTED_IN relationship from Tom Hanks to the movie. This relationship will not be matched again on the right hand side.

    Some more examples of this in the Neo4j Manual- http://neo4j.com/docs/stable/cypherdoc-uniqueness.html

    0 讨论(0)
提交回复
热议问题