Imagine my query results in nodes with different names, but in my next query, I want to search in the merged version of the previous result. How can I merge two lists or two set of nodes? As an example, imagine I have
(:class1)-->(c1:class2)-->(:class3)--(:class4)-->(c2:class2)
and then I would like to do a MATCH based on the distinct elements in the merge of c1.name and c2.name.