Match patterns and return projections

Match nodes by label and properties using MATCH, then return specific fields from query results

falkordb 8e90fd6 2 files · 1.7 KB Updated

File contents

Match patterns and return projections

Match nodes by label and properties, then return specific fields from the query results.

Usage

Use MATCH to find nodes and relationships based on patterns, then use RETURN to project specific properties.

Example

redis-cli GRAPH.QUERY social "MATCH (alice:User {name: 'Alice'})-[:FRIENDS_WITH]->(friend)
RETURN friend.name"

Notes

  • MATCH accepts label filters (:User) and property filters ({name: 'Alice'})
  • Relationship patterns are specified between nodes using -[:RELATIONSHIP_TYPE]->
  • RETURN allows you to select specific properties to return from matched nodes
  • Use dot notation to access node properties (e.g., friend.name)

falkordb/skills/tree/main/cypher-skills/match-patterns-and-return-projections commit 8e90fd69fd

Frequently asked questions

npx skillmds@latest add falkordb/match-patterns-and-return-projections