Reputation: 10531
MATCH (s:Product {id:'002'})-[r]-> (o:Attributes)
WHERE any(key in keys(o)
WHERE key CONTAINS value)
return s, r, o
In the 2nd clause, I want to express either "key CONTAINS value" OR "value CONTAINS key". How to add the second possibility in this WHERE clause?
Upvotes: 0
Views: 41
Reputation: 30397
Assuming the value
variable is in scope from some unseen earlier section in the query, it should be as easy as adding the OR and the predicate:
...
MATCH (s:Product {id:'002'})-[r]-> (o:Attributes)
WHERE any(key in keys(o)
WHERE key CONTAINS value OR value CONTAINS key)
RETURN s, r, o
Upvotes: 1