Reputation: 2611
I want to retrieve paths between the nodes with two conditions on relationship.
1)Retrieve nodes upto two levels
Ex: Path between "A" and "B"
So, path can be anything like A-->B (or) A-->x-->B (or) A-->x-->y-->B
2)Property in the relationship should hold some specific value
Ex: Property in the relationship is Val:Decimal Value
So, relationship.val >= 0.5
Here is my initial query,
MATCH p=(a:amps{word:"review"})-[r*1..2]->(b:amps)
RETURN p
Now, How can I add another condition to the relationship. The second relationship condition specified into the above query.
Upvotes: 2
Views: 541
Reputation: 10856
No problem!
MATCH p=(a:amps{word:"review"})-[r*1..2]->(b:amps)
WHERE ALL(rel IN rels(p) WHERE rel.val >= 0.5)
RETURN p
Upvotes: 2