cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Single Source to Nearest K Destination Nodes

Hi All,

This is my first time here. I've done a lot of Google searching to find what I'm looking for but haven't found it.

I am looking for an algorithm and the Cypher to do the following:

  1. Given a query to match one starting node: MATCH (start:Person {name: "me"})
  2. Given a query to match mulitple ending nodes: MATCH (end:Store {state: "7-Eleven"})
  3. Given relationships between nodes having non-negative weight attribute cost
  4. Starting with the start node, find the "nearest" (based on shortest weighted path) K ending nodes and return the ending nodes along with cost of the shortest path to each.

Note that the start and ending nodes are not directly connected, but rather may be connected through other nodes.

Thank you in advance.

0 REPLIES 0