Hi,
I have a graph, that contains persons that are all linked via Link nodes and therefore kept together in groups using a Group node. (See step 1)
It should be possible to delete links, which results in seperated clusters of linked persons still remaining in the same group. (See step 2)
I need a query that reorganizes the clusters and give them seperate group nodes. (See step 3)
I have tried to accomplish this by iterating through the connected persons on the originating group and doing an aopc.subgraph on the LINKS_TO edges to get a cluster and reattach them to a new group node. But when I do a subgraph starting with Person "B", i later have not to do it for Person "C" and "D", because they are already in a new group (Maybe Blacklist them for the subgraph method, but how?). Can anybody help solving this without GDS library (I did it with projection and weakly connected component search, but this is overkill and I don't want to use the GDS library)
To create the sample graph with the lost links:
CREATE (n6:Person {Name: "D"})-[:LINKS_TO]->(:Link)<-[:LINKS_TO]-(:Person {Name: "B"})-[:IS_PART]->(n0:Group)<-[:IS_PART]-(:Person {Name: "C"})-[:LINKS_TO]->(:Link)<-[:LINKS_TO]-(n6),
(n6)-[:IS_PART]->(n0)<-[:IS_PART]-(:Person {Name: "A"}),
(n0)<-[:IS_PART]-(:Person {Name: "E"})-[:LINKS_TO]->(:Link)<-[:LINKS_TO]-(:Person {Name: "F"})-[:IS_PART]->(n0)
Thanks for suggestions...