Results 1 to 2 of 2

Thread: [Neo4j] Shortest Path example using spring data

  1. #1
    Join Date
    Dec 2011
    Posts
    4

    Default [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. #2
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •