Announcement Announcement Module
Collapse
No announcement yet.
[Neo4j] Shortest Path example using spring data Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Neo4j] Shortest Path example using spring data

    Hi,

    I would like to implement a shortest path (e.g., Dijkstra, A*) in Neo4j. Are there any examples on how to do this using Spring Data? The examples I've found so far all don't use Spring Data.

    Thanks,
    Markus

  • #2
    I think the best way of doing that, would be to use the Neo4j GraphAlgoFactory and PathFinders and then convert the resulting Paths (or its objects into your entities). You can use template.projectTo and template.createEntityFromState or createEntityFromStoredState to create your entities.

    You can use new EntityPathPathIterableWrapper(paths) for automatically wrapping your result paths.

    Comment

    Working...
    X