[英]Match nodes with two different values in same property Neo4j
I have this kind of graph: 我有这种图:
I want to retrieve all Products that have pending or open requests. 我要检索所有具有待处理或未决请求的产品。 This is how Im trying
我就是这样想的
MATCH (s:ServiceRequest {srStatus: "Open"} OR {srStatus: "Pending"}) -[:FOR]->(p:Product) RETURN p
But this does not work. 但这是行不通的。 How can I do that?
我怎样才能做到这一点?
This should work: 这应该工作:
MATCH (s:ServiceRequest)-[:FOR]->(p:Product)
WHERE s.srStatus IN ["Open", "Pending"]
RETURN p;
and so should this: 所以应该这样:
MATCH (s:ServiceRequest)-[:FOR]->(p:Product)
WHERE s.srStatus = "Open" OR s.srStatus = "Pending"
RETURN p;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.