I'm trying to use Neo4j's algo.beta.louvain(). I noticed that it returns results that are quite different (# of communities and # of nodes in each community) if I order the nodes in label
differently. The following 3 calls return different results. And I'm using {concurrency: 1}. Is there something I'm not getting?
CALL algo.louvain.stream('MATCH (n:Node) WHERE <some-condition> RETURN id(n) as id order by n.id desc', <relationship>, <config>)
CALL algo.louvain.stream('MATCH (n:Node) WHERE <some-condition> RETURN id(n) as id order by n.id asc', <relationship>, <config>)
CALL algo.louvain.stream('MATCH (n:Node) WHERE <some-condition> RETURN id(n) as id order by id(n) desc', <relationship>, <config>)
In the same Neo4j instance, the above is what I noticed which relates to my actual problem. What I'm really trying to do is to get consistent results for different Neo4j instances with the same data. In debugging why the results are different in different instances, I noticed that I can reproduce a related problem by giving same set nodes in different order. I didn't have the "order by" in the original code but I bet in different instances of Neo4j, the natural ordering is different causing the different results.