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.

Recursive Query with undefined levels

Hello everyone, I am working with neo4j, I have comments that are related to a post. how to have each comments and all its child comments. can someone help me please

1 REPLY 1

Hi! You're looking for Variable-length pattern matching: https://neo4j.com/docs/cypher-manual/current/syntax/patterns/#cypher-pattern-varlength

Example: p = MATCH (:Comment)<-[:IS_CHILD*]-(c)