We could solve most of the migration problems but are running into the issue that we were using the unionFind algorithm at one point in the code:
Result r = db.execute(String.format("CALL algo.unionFind.stream('%s', '%s', {graph:'cypher'}) YIELD nodeId, setId", cypherNodeQ, cypherRelQ));
As far as we can see, we are now supposed to do this with the Graph Data Science library, making a projection from the node/relationship query and then calling gds.wcc.stream() on the projection. My question is, can we call the GDS library on an embedded database via a Java API? If so, how, and is it documented anywhere?
Hello @tziai ,
You are right, the replacement for unionfind is wcc.
Also first projecting a graph + running wcc + drop the graph is the intended work flow.
Essentially the replacement for the previous syntax is gds.graph.project.cypher. Although I would recommend to have a look at the newer version of cypher projections (Projecting graphs using Cypher - Neo4j Graph Data Science).
In theory its possible to run against the Java API of GDS, but its not officially supported.
I would suggest to continue using db.execute.
@tla in this case it depends on the mode you want to execute. Its org.neo4j.gds.wcc.WccWriteProc or org.neo4j.gds.wcc.WccStreamProc (I hope the pattern is clear).
And its part of the proc-community module.
Thank you for your answer @florentin_dorre. Well gds is not yet integrated at all. The question namely is how to do that! E.g. which alternative class to register instead of UnionFindProc.class? Or may be a completely different way?