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].
For more options, visit https://groups.google.com/groups/opt_out.