我想在关系中检索具有两个条件的节点之间的路径。
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
这是我的初步查询,
MATCH p=(a:amps{word:"review"})-[r*1..2]->(b:amps)
RETURN p
现在,我如何为关系添加另一个条件。第二个关系条件指定到上面的查询中。
答案 0 :(得分:2)
没问题!
MATCH p=(a:amps{word:"review"})-[r*1..2]->(b:amps)
WHERE ALL(rel IN rels(p) WHERE rel.val >= 0.5)
RETURN p