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.

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.

3X_e_3_e34e39bdf5105753177e2e167ab2089ac2e4a9b5.png

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"

1 REPLY 1

Hello @bill.dickenson

I think you are looking for variable length relationships.

Regards,
Cobra