Hi,

I have a problem in which I need to specify repeating path patterns in
Cypher.

The Problem:
Find the route between two cities which aren't directly connected to each
other.

Original design:
(a:City)-[:FLIGHT]->(b:City)

To get the shortest route, I could simply run a query that specified
(i:City{name:"Istanbul"})-[r:FLIGHT*1..6]->(l:City{name:"Ulan Bator"}) to
say that the path length could be arbitrary, and then process the returned
paths

However, flight is a hyperedge, which means we need to model it differently.

New Design:
(a:City)<-[:LEAVES_FROM]-(:Flight)-[:GOES_TO]->(b:City)

How do I define a path of arbitrary length in this?

Does the design even make sense from a semantic perspective?

Any help would be appreciated.


-- Thanks and Regards
   Mahesh Lal

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to