I am writing a query that returns a relationship according to the attributes of two nodes.
MATCH (a:nodeLabel)-[r:relationType]-(b:nodeLabel) WHERE a.attribute=nodeA AND b.attribute=nodeB RETURN r
There are about one million pairs of nodes. I used for loop to execute this query for each node pair in python and it took so much long time. I thought I can query relationships between million pairs of nodes in one query. But I did not find a solution. Any suggestions?
Many thanks for any help!