(n:Person)

Node with Person label.

(n:Person:Swedish)

Node with both Person and Swedish labels.

(n:Person {name: $value})

Node with the declared properties.

()-[r {name: $value}]-()

Matches relationships with the declared properties.

(n)-->(m)

Relationship from n to m.

(n)--(m)

Relationship in any direction between n and m.

(n:Person)-->(m)

Node n labeled Person with relationship to m.

(m)<-[:KNOWS]-(n)

Relationship of type KNOWS from n to m.

(n)-[:KNOWS|:LOVES]->(m)

Relationship of type KNOWS or of type LOVES from n to m.

(n)-[r]->(m)

Bind the relationship to variable r.

(n)-[\*1..5]->(m)

Variable length path of between 1 and 5 relationships from n to m.

(n)-[\*]->(m)

Variable length path of any number of relationships from n to m. (See Performance section.)

(n)-[:KNOWS]->(m {property: $value})

A relationship of type KNOWS from a node n to a node m with the declared property.

shortestPath((n1:Person)-[\*..6]-(n2:Person))

Find a single shortest path.

allShortestPaths((n1:Person)-[\*..6]->(n2:Person))

Find all shortest paths.

size((n)-->()-->())

Count the paths matching the pattern.

Comments