Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-08-2020 12:23 AM
Hi all !
I try to run a closness centrality algorithm with the gds plug-in but I can't figure out how to make the query.
I have understood that the query needs a node and relationship projection to be run.
I have good results with this query for SYSTEM_VARIABLE
nodes linked with STRUCTURAL_AND_OPERATIONAL_DEPENDENCY
relationship:
CALL gds.alpha.closeness.stream({
nodeProjection: 'SYSTEM_VARIABLE',
relationshipProjection: 'STRUCTURAL_AND_OPERATIONAL_DEPENDENCY'
})
YIELD nodeId, centrality
RETURN gds.util.asNode(nodeId).name AS user, centrality
ORDER BY centrality DESC
But now I would like to perform this algorithm on all my nodes, whatever the relationships are.
How can I specify "all nodes" and "all relationship" in these projections ?
Thanks for your help.
Solved! Go to Solution.
09-08-2020 03:35 PM
You can use the *
syntax to specify all nodes and all relationships:
CALL gds.alpha.closeness.stream({
nodeProjection: '*',
relationshipProjection: '*'
})
YIELD nodeId, centrality
RETURN gds.util.asNode(nodeId).name AS user, centrality
ORDER BY centrality DESC
09-08-2020 03:35 PM
You can use the *
syntax to specify all nodes and all relationships:
CALL gds.alpha.closeness.stream({
nodeProjection: '*',
relationshipProjection: '*'
})
YIELD nodeId, centrality
RETURN gds.util.asNode(nodeId).name AS user, centrality
ORDER BY centrality DESC
09-09-2020 12:12 AM
Thanks Alicia ! It's perfect
All the sessions of the conference are now available online