Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-03-2020 09:15 AM
My target to match looks like the following:
(:A) -[:R]-> (:B {val: 1})-> [:R]-> (:B {val : 2} )-> [:R]-> (:B {val: 3})-> [:R]-> (:B {val : 4})-> [:R]->(:C)
and I can match it with
MATCH (:A)-[:R *]->(C)
but is there a way I can specify constraints for the intermediate nodes? E.g. I want to specify that the val
property for them should match up in a sequence (1, 2. 3, 4, ...)
11-07-2020 12:07 AM
use path
https://neo4j.com/docs/cypher-manual/current/syntax/patterns/#cypher-pattern-path-variables: "MATCH path=(:A)-[:R *]->(C)"
and then use the nodes in each path with "nodes(path)"
but I won't be that sure that they will be returned in the order in which they are present in the path.
Maybe they are: iterate through the nodes and let us know.
All the sessions of the conference are now available online