The query below -
MATCH (p:Person)-[:WROTE]->(m:Movie)
WHERE NOT exists( (p)-[:DIRECTED]->() )
RETURN p.name, m.title
reads as such, correct?
"Match all people who wrote a movie who did not direct ANY movie"
It does not read as the following:
"Match all people who wrote a movie who did not direct THAT movie"
for it to be "that" movie, the query would have to include the following:
NOT exists( (p)-[:DIRECTED]->(m) )
Additionally, the following:
MATCH (gene:Person)-[:ACTED_IN]->(m:Movie)<-[:ACTED_IN]-(other:Person)
WHERE gene.name= 'Gene Hackman'
AND exists( (other)-[:DIRECTED]->() )
RETURN gene, other, m
Reads as -
"find Gene Hackman and ANY movie that he acted in
with another person who also directed ANY movie"
And NOT as -
"find Gene Hackman and THE movies that he acted in
with another person who also directed THE movie"
correct?