I want to match between entities by multiple relationship types.
Is it possible to say the following query:
match (Yoav:Person{name:"Yoav"})-[:liked & watched & ... ]->(movie:Movie) return movie
I need "and" between all the relation types; Yova liked and watched and .. a movie.
Yes, you can do something like:
match (gal:Person{name:"Yoav"})-[:liked|:watched|:other]->(movie:Movie)
return movie
Take a look in the docs: Match on multiple relationship types
EDIT:
From the comments:
I need "and" between the relation types.. you gave me an "or"
In this case, you can do:
match (Yoav:Person{name:"Yoav"})-[:liked]->(movie:Movie),
(Yoav)-[:watched]->(movie),
(Yoav)-[:other]->(movie)
return movie