Neo4j: k-shortest way. Embedded algorithm support

I need to find k-shortest paths between two nodes in neo4j.

Settings so far:

I found support for the built-in algorithm for Djikstra, A * using shortestpath, calls to allshortestpath, and APOC procedures, but none of them work for me.

  • All this gives a “one / many shortest way to rent weight / path length” and not the best k shortest way
  • Giving depth in relation to [: CONNECTED_TO * 1..n] will not help either

I went through the question

Also found this plugin https://github.com/Caleydo/neo4j-kshortestpaths-plugin But he can not figure out how to use it. I can successfully add it to neo4j plugins

Any pointers are welcome

+4
source share
1 answer

I can run this plugin https://github.com/Caleydo/neo4j-kshortestpaths-plugin and it also gives the correct result.

How to use:

  • Build a package using MVN with the correct version of neo4j that you are using. Update the POM file with neo4j version to building
  • You need to pass the node URI , not node / nodeID, as a parameter for the source and target. (I am stuck here at this point)
+3
source

Source: https://habr.com/ru/post/1677521/


All Articles