0

I would like to find the shortest path (if exists) between two nodes. The property path which includes the * operator doesn't help me, because i cannot find the shortest one using it. Is there a function like the shortestPath() one which Neo4j has?

ilmav
  • 13
  • 4
  • 1
    no there is no such function. – UninformedUser Sep 20 '20 at 15:56
  • 2
    other than that, you can try something like suggested [here](https://stackoverflow.com/questions/31048247/calculate-length-of-path-betwen-nodes-with-unknown-edges) and [here](https://stackoverflow.com/questions/18024413/finding-all-steps-in-property-path) though both have obvious limitations because SPARQL was never meant to be a graph traversal language like Cypher, Gremlin, etc. – UninformedUser Sep 20 '20 at 15:59
  • They use client code here: http://graphdb.ontotext.com/free/devhub/map.html. Try Stardog, Anzograph, Blazegraph (google "‹triplestore› + shortest path"). – Stanislav Kralin Sep 21 '20 at 08:39

1 Answers1

0

If you have a lot of data you might want to consider using AnzoGraph. Docs and examples here https://docs.cambridgesemantics.com/anzograph/v2.2/userdoc/shortest-path.htm

Disclaimer: I work for Cambridge Semantics Inc.

Sean Martin
  • 171
  • 3