cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Directed Paths shown when not Directed?

rcfro2
Node Clone

Why does the returned nodes show a directed relationship when the relationship is not directed actually ?

match (p)-[:KNOWS]-(k:Person{name:"Keanu Reeves"})
return p, k
limit 5

1 ACCEPTED SOLUTION

You misunderstand here, all relationships have a direction, there is no such thing as an undirected relationship in Neo4j, and results will show the direction of the relationships returned.

When you omit the direction of a relationship when you query, you're saying that the direction of the relationship is not a factor in the pattern to match, allowing the match to apply no matter the direction of the relationship.

View solution in original post

1 REPLY 1

You misunderstand here, all relationships have a direction, there is no such thing as an undirected relationship in Neo4j, and results will show the direction of the relationships returned.

When you omit the direction of a relationship when you query, you're saying that the direction of the relationship is not a factor in the pattern to match, allowing the match to apply no matter the direction of the relationship.