cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Unique All Shortest Paths

johnmattgrogan
Node Clone

Hi Everyone,

Edit
To clarify a little, I understand why the nodes are connected in the graph presentation in the browser, however I'd like the data to work with in a somewhat more use friendly way. I'm trying to hack my way through the JSONish format i get now. Thanks!!

I've got a question about splitting out paths from a larger graph. I've solved one problem with my below query, however the view returned has the nodes connected as a large 'tree' like structure. I'd like to see each individual path from the 'Coach' to the 'NavyQualifier2021' Nodes.

match (w:Wrestler)-[wi:WRESTLED_IN {school:'Navy'}]-(m:Match {year:2021}), 
      (ck:Wrestler {w_key:"Cary Kolat"})
WITH collect(w) as navy_qualifiers, ck as kolat
UNWIND navy_qualifiers as qualifier
MATCH p = shortestPath((kolat)-[:WRESTLED*]-(qualifier))
  WHERE NONE(n IN nodes(p) WHERE n.name = 'Bye')
RETURN p

I get what I want with this result, however I'd just like to have a different view for easier of all the paths.

0 REPLIES 0