cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Can I give a weight to my graph?

Hey everyone ,

I already made clusters in my graph by using this queries :

CALL algo.unionFind(
'match (n) return id(n) as id',
'match (n1:Attributaires)--(n2) return id(n1) as source, id(n2) as target',
{graph:'cypher', write:true, partitionProperty:"clusterId"})
YIELD nodes, setCount, loadMillis, computeMillis, writeMillis;

And then this query to identify my clusters :

match (n1:Attributaires)-[r]-()
with n1.clusterId as clusterId, count(n1) as clusterSize,count(distinct r) as numberOfRels
where clusterSize > 10 AND  numberOfRels > 10
match (n2) where n2.clusterId = clusterId
MERGE (x:Cluster {id: clusterId})
MERGE (n2)-[:IN_CLUSTER]->(x)

Now I want to know the exact number of relation between each node in my clusters .
Can I apply this method after making clusters ? https://neo4j.com/docs/graph-algorithms/current/algorithms/connected-components/#_weighted_version

Or shall I apply the weight before making clusters ?

0 REPLIES 0