I'm trying to write a query that iterates over a collection of nodes by their index (so that I can iterate two lists in tandem). I'm not getting expected results.
For example, if I have 10 nodes with label "Node" in my graph and I query
MATCH (n:Node) WITH n, collect(n) AS myNodes RETURN size(myNodes) I expect to get one result
Instead, I get 10 results
size(myNodes) 1 1 1 ...
I expected from the answer to this SO question that I should be able to iterate over the results of a
collect() function by the index.