Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

degree centrality does not work with loaded, named graphs (NPE) #878

Open
jexp opened this issue Apr 6, 2019 · 1 comment
Open

degree centrality does not work with loaded, named graphs (NPE) #878

jexp opened this issue Apr 6, 2019 · 1 comment
Assignees

Comments

@jexp
Copy link
Member

jexp commented Apr 6, 2019

neo4j-sh (?)$ call algo.graph.load('wiki',null,null,{write:false});
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name   | graph   | direction  | undirected | sorted | nodes    | loadMillis | alreadyLoaded | nodeWeight | relationshipWeight | nodeProperty | loadNodes | loadRelationships |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "wiki" | "heavy" | "OUTGOING" | false      | false  | 11474730 | 7791       | false         | <null>     | <null>             | <null>       | <null>    | <null>            |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row
7815 ms
neo4j-sh (?)$ call algo.degree(null,null,{write:false,graph:'wiki'});
177 ms

WARNING: Failed to invoke procedure `algo.degree`: Caused by: java.lang.NullPointerException
@nichtmonti
Copy link

This seems to be caused by named graphs being "OUTGOING" by default and degree centrality calculating "INBOUND" centrality by default.
Altering the query to
call algo.degree(null,null,{write:false,graph:'wiki', direction:'outgoing'});
yields the expected results

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants