Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-15-2020 08:25 PM
For example, there are A, B, C, D, E, F, G, H, I, J, K, L, M, N 14 nodes. A, B, C, D, F, L have a common attribute value x is defined as x community. C, D, E, G, L have a common attribute value y is defined as y community. F, H, I, M have a common attribute value z is defined as z community. H, I, J, K, M, N have a common attribute value w is defined as w community. According to neo4j's connected component algorithm, these 14 nodes are considered as a community. I expect to divide the community according to another standard. I hope to use the number of overlapping nodes as the community division standard. If the "overlapping number is 3" is used as the standard for community division, then A, B, C, D, E, F, G, L are a community, and F, H, I, J, K, M, N As a community.Thank you very much!
05-19-2020 03:36 PM
I thought of a solution, but there are still some confusion:
Code show as below:
CALL apoc.periodic.commit("match(m:property)<--(n:nodes)
with m.community,collect(n.id) as list
where size(apoc.coll.intersection(first,second))>2 LIMIT {limit}
with first,second
apoc.coll.union(first, second)
return size(apoc.coll.intersection(first,second))>2",
{limit:5}
)
What to replace the 'first' and 'second'?Please give me some advice.Thank you very much!
All the sessions of the conference are now available online