I wish to match the orange node based on the fact that the two gray nodes are part of the same array (the distance is in the same span)
I wish to match the blue node based on the fact that the two green nodes are part of the same array
The math seems to be above my league
I tried:
MATCH (m1) WHERE m1.range[0] < m.range[0] AND m1.range[1] < m.range[1]
WITH m1, m
MATCH (m2) WHERE m2.range[0] > m1.range[0] AND m2.range[1] > m1.range[1]
WITH m1,m2,m
RETURN m1.name AS startPart, m2.name AS endPart