MATCH (s:Product {id:'002'})-[r]-> (o:Attributes)
WHERE any(key in keys(o)
WHERE key CONTAINS value)
return s, r, o
在第2节中,我想表达“key CONTAINS value”或“value CONTAINS key”。如何在WHERE子句中添加第二种可能性?
答案 0 :(得分:1)
假设value
变量在查询中某些未见过的部分的范围内,它应该像添加OR和谓词一样简单:
...
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