4

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

Options tried till now:

I found Built-in Algorithm support for Djikstra,A* using shortestpath, allshortestpath calls as well as APOC procedures but none which suits my need.

  • All these give "one/many shortest path of lease weight/length of paths" and not best k shortest path
  • Giving Depth in the relation [:CONNECTED_TO*1..n] does not help either

I have gone through the question

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

Any pointers welcome

Community
  • 1
  • 1
Priyank Mehta
  • 2,057
  • 2
  • 19
  • 32

1 Answers1

3

I am able to run this plugin https://github.com/Caleydo/neo4j-kshortestpaths-plugin and it gives the correct result as well.

How to Use:

  • Build the package using MVN against correct neo4j version that you are using. Update the POM file with the neo4j version before building
  • You need to pass node URI and not node/nodeID as parameter for source and target. (I was stuck here in this step)
Priyank Mehta
  • 2,057
  • 2
  • 19
  • 32