There is the situation in which i need to match any one of the label of node.
We can do it for relationship types like
(n)-[:KNOWS|LOVES]->(m)
Can we match node labels like this? eg.
MATCH (c:computer)<-[:belongs_to]-(comp:HP|IBM)
return comp
Currently I have tried this and it gives results, Is there any simpler way?
MATCH (c:computer)<-[:belongs_to]-(comp)
WHERE 'HP' IN labels(comp) OR 'IBM' IN labels(comp)
return comp