Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-05-2020 03:33 PM
CALL algo.closeness.harmonic.stream(
'MATCH (n:alias) RETURN id(n) AS id',
"MATCH (n)-->(m:alias) RETURN id(n) AS source, id(m) AS target",
{graph: "cypher", direction: 'BOTH'})
YIELD nodeId, centrality
WITH algo.asNode(nodeId) AS node, centrality AS centrality_h_stream
SET node.harmonic_centrality = centrality_h_stream
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure algo.closeness.harmonic.stream
: Caused by: java.lang.NullPointerException
I added the lines the following lines in neo4j.conf file with no luck
"dbms.security.procedures.unrestricted=apoc., algo. dbms.security.procedures.whitelist=apoc., algo."
CALL algo.closeness.stream(
'MATCH (n:alias) RETURN id(n) AS id',
"MATCH (n)-->(m:alias) RETURN id(n) AS source, id(m) AS target",
{graph: "cypher", direction: 'BOTH'})
YIELD nodeId, centrality
WITH algo.asNode(nodeId) AS node, centrality AS centrality_stream
SET node.centrality = centrality_stream
02-05-2020 07:08 PM
Hi @lavanya.kannan - the harmonic variant of closeness centrality was an experimental implementation that our labs team implemented as a proof of concept. The null pointer exception is a bug, and no configuration changes will fix it, unfortunately . We're deprecating the harmonic variant in our next release. We recommend using the closeness centrality algorithm instead.
02-06-2020 07:12 AM
Hi @alicia.frame Thanks for the clarification.
Harmonic Centrality would be a good measure to use. Would be nice to have it back working.
Please see my other post on handling directionality while computing closeness centrality: Running closeness centrality with or without directions
All the sessions of the conference are now available online