Matching Patterns with Cypher MATCH
Master the MATCH clause to find specific patterns of nodes and relationships within your graph data.
Discovering Data with MATCH
Welcome to the core of graph querying! The MATCH clause in Cypher is how you find specific patterns of data in your Neo4j graph.
Think of it like drawing the shape of the data you want to find. You describe nodes, relationships, and their properties, and Neo4j finds all instances that fit your description.
Finding Any Node
The simplest MATCH query finds any node in your graph. You represent a node using parentheses ().
Adding a variable inside, like (n), lets you refer to that node later, for example, to return its properties. We'll use LIMIT to show just a few results.
MATCH (n)
RETURN n LIMIT 3All lessons in this course
- Nodes, Relationships, and Properties
- Creating Data with Cypher CREATE
- Matching Patterns with Cypher MATCH
- Returning and Shaping Results with RETURN