neo4j-contrib / neo4j-graph-algorithms

Efficient Graph Algorithms for Neo4j
https://github.com/neo4j/graph-data-science/
GNU General Public License v3.0
770 stars 195 forks source link

Apoc.algo.betweenness error with 'ProcedureNotFound': call apoc.help('algo') running #796

Open ammubharatram opened 5 years ago

ammubharatram commented 5 years ago

apoc.algo. betweenness procedure not found for me, ran following query similar to shown here on github :

MATCH (o:Originator),(b:Beneficiary)
WITH collect(o) AS origs
CALL apoc.algo.betweenness(['LINKED_TO_ORIGINATOR'], origs, 'INCOMING') YIELD node, score
//Measuring shortest path between customers connected to each originator
SET node.betweenness = score
RETURN node AS originator,score ORDER BY score DESC LIMIT 25

However, I get an error that the procedure is not found: enter image description here I ensured my conf file is well configured using stack overflow answers 1 and 2

Proof that call apoc.help('algo') is working: enter image description here

Is the method apoc.algo.betweenness procedure removed from APOC library?

Alternately, I tried using apoc.betweenness but not sure how to set the relationship type as 'Incoming' and the node name (which of course is another question if this doesn't work). Thanks in advance!

tomasonjo commented 5 years ago

Betweenness centrality algorithm is available in both APOC and this Graph Algorithms plugin. Graph Algorithms plugin has more graph algorithms, that are also better optimized and more suited for use.

You should use algo.betweenness() procedure when trying to run betweenness centrality algorithm. Documentation is available at https://neo4j.com/docs/graph-algorithms/current/algorithms/betweenness-centrality/