Is there a limit to the number of nodes we can specify in a path?

I have a query that has a few number of "hops" before it gets to resolution and I am wondering if there is a limit to this kind of thing.

image

The goal is to find situations where the A is somewhere downstream from B, and C is downstream from B also but not in the same path. I found one of these with 5 hops.

match (l {name:'A'}), (m {name:'B'{), (n {name:'C'}) where (l)<-[]-(m) AND ( (m)-[]->(n) set b.flag = true return count(b)

or would

match (l {name:'A'}), (m {name:'B'{), (n {name:'C'}) where (l)<-[]-(m)-[]->(n) set b.flag = true return count(b)

work ? Are there limits to the "hops"

Hello @bill_dickenson :slight_smile:

I think you are looking for variable length relationships.

Regards,
Cobra