I tried to run the following command in Neo4j however it gives the error Unknown function 'algo.getNodeById'. I am using Neo4j desktop (3.4.0) and I am running this command in Neo4j browser:
CALL algo.unionFind.stream('', ':REL', {})
YIELD nodeId,setId
RETURN algo.getNodeById(nodeId).id AS user, setId
I want to find connected components (top10 maximum connected) in my graph. Any other solution which can help me visualize the connected component in the graph will also work
Some of the older versions of algorithms don't have algo.getNodeById()
included. If you can try to use the latest graph algorithms, not sure how this works with Neo4j Desktop, but I would try to reinstall them. You could also upgrade your Desktop version.
If none of this is available remember that algo.getNodeById()
just matches the node by its internal ID and you can get the same functionality by using the following.
CALL algo.unionFind.stream('', ':REL', {})
YIELD nodeId,setId
MATCH (node) where id(node) = nodeId
RETURN node.id AS user, setId
来源:https://stackoverflow.com/questions/54435055/unknown-function-algo-getnodebyid