I am developing a Question Answering application using Neo4j in Java. For that I need to find intermediate nodes between given two nodes through any relationship.
For Example given Graph:
A - x -> C
B - y -> C
Therefore if given [A,B] nodes, the output should be [C], because it is connected to both A and B through relationship x and y respectively. Is this possible using Java driver of neo4j.
Thanks
If A and B have ids 1 and 2, the cypher query you want looks something like:
Make this query from your Java setup and you should be good to go