I've wrote a cypher query to show the relationship between two movie nodes:
MATCH (m1:Movie)-[r*1..2]-(m2:Movie)
where m1.movieID = '1' AND m2.movieID = '2'
RETURN r
LIMIT 25
It's returns this in the Neo4j browser, and this is exactly what I want to create in d3.js. Eventually the movieIDs will be parameters, so the results will be different for each pair of movies.
I've been following the Neo4j-core Ruby example seen here to create my own graph, but my problem is that I can't RETURN
common nodes between the two moves, i.e Tag
/Country
nodes.
How should I solve this problem? Should I create a query to return the two movies, and another query to return the common nodes between them? How would I write this latter query? I'm really stuck on how I can visualise this relationship...