I'm using cypher query to find the paths between two nodes using cypher query
Match p = (n{ConceptID: 'C0000039'})-[r]-()-[s]- (m)
WHERE r.RelationLabel CONTAINS "may_be_treat" or s.RelationLabel CONTAINS "may_be_treat"
RETURN p
But this query can return path with maximum depth of 2, how can I give path as variable(2,3,4,5,6) in this query, with condition as r.RelationLabel CONTAINS "may_be_treat"
variable length
notation for that:(n)-[*1..5]->(m)
: find alln
andm
nodes connected with a path length no more than 5. I can recommend to use the cheatsheet. – MarcoLr
should be connected directly ton
ands
directly connected tom
, right? – Bruno Peresn
andn1
should have a propertyRelationLabel
that contains "may_be_treat"? Or ony one is enough? I believe that is a good ideia edit the question and put on it a sample data set and the desired output. – Bruno Peres