I am trying to retrieve all the nodes and edges (edges can be optional if it improves performance) that connect a set of nodes n, m, x, and y
I know the connectivity in advance:
What would be the most efficient way to gather all the nodes (without duplicates)?
What I have tried:
- regular path matching
What I have found is that I can only get a decent performance with apoc.path.expandConfig, searching for other approaches (that I might have missed).