Hi,
How do you search in the relationship properties if the relationship properties has an array of values?
For e.g.
- In the Movie database, the Person has Acted_IN Movies.
- A person plays multiple roles for e.g. Keanu Reeves ACTED_IN 'The Matrix'. The 'ACTED_IN' has properties called roles, and the values are for e.g. ['Neo', 'Reo', 'Leo'].
In this case, If I want to check in the database who has ACTED_IN role ='Reo', how do we express this?
In this case, the following query will not return any result:
match (p:Person)-[a:ACTED_IN]->(m:Movie{title:'The Matrix'}) where a.roles = 'Reo' return p.name, m.title, a.roles
But if we use the
match (p:Person)-[a:ACTED_IN]->(m:Movie{title:'The Matrix'}) where a.roles = ['Neo', 'Reo', 'Leo'] return p.name, m.title, a.roles
Then we get the result back.
I donot want to query using all roles, but only one of the many roles.
Thanks
Bijay