Hmm... Specifying "both" gives me a 500 - Server Error Leaving off the direction gives me a "org.neo4j.graphdb.NotFoundException" exception, even if a path exists over "CONNECTS_TWO_WAY" relationships. I was hoping that an array of allowable relationship dictionaries could be passed, but I can't get that to work.
On Saturday, February 22, 2014 11:31:18 PM UTC+13, Michael Hunger wrote: > > Try to either leave off the direction field or use "both" > > Sent from mobile device > > Am 22.02.2014 um 11:18 schrieb nw31304 <[email protected]<javascript:> > >: > > I have a graph with nodes connected by potentially two different > relationship types: > > > - "CONNECTS_TWO_WAY" > - "CONNECTS_ONE_WAY" > > Each of these relationships have a "weight" property. Now suppose I > wished to use the REST API to invoke Dijkstra to find a shortest path. I'm > not sure how to structure the JSON to say that "CONNECTS_TWO_WAY" > relationships can be traversed regardless of the relationship direction > (i.e. either "in" or "out") whereas only outbound CONNECTS_ONE_WAY > relationships can be traversed as part of a valid shortest path. > > I've tried to pass an array of relationship dictionaries as follows, with > comical results. Is there a way to specify this via REST? > > { > "to" : "http://localhost:7474/db/data/node/3074", > "cost_property" : "weight", > "relationships" : [ > { > "type" : "CONNECTS_TWO_WAY", > "direction" : "out" > }, > { > "type" : "CONNECTS_TWO_WAY, > "direction" : "in" > }, > > { > "type" : "CONNECTS_ONE_WAY, > "direction" : "out" > } ], > "algorithm" : "dijkstra" > } > > -- > 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] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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/groups/opt_out.
