0

I have a User node with two properties: partitaionA and partitionB which I generated from unionFind in graph algorithms package.

I want to do something like below but keep expanding like union operation. partitionA -> partitionB -> partitionA -> partitionB -> ......... until the number of users in the group does not grow.

Match (u: User) 
WHERE u.partitionA = 123 
WITH collect(u.partitaionB) as next_level 
MATH (uu: User) 
WHERE uu.partitionB in next_level 
RETURN uu

Is there any stored procedure can do something like this? Not sure what is the best way to describe this question.

For the data model, I only have User node in this case and User node have 2 properties: partitionA and partitionB.

mlo0424
  • 359
  • 2
  • 4
  • 16

0 Answers0