Home Ask Login Register

Developers Planet

Your answer is one click away!

Sumit Chourasia February 2016

How to add bidirectional edge using Rexster?

I'm using Rexster To Create edge between two vertex using the HTTP POST Method.

/graphs/<graph>/edges/3?_outV=<id>&_label=friend&_inV=2&<key>=<key'>

I'm referring link :

Rexster HTTP

Here I need to provide out vertex (i.e _outV ) and in vertex (i.e _inV), which is a single direction edge. How can I create a bi-directional edge using Rexster.

Answers


stephen mallette February 2016

TinkerPop doesn't support a bi-directional edge type as part of Blueprints (or TinkerPop 3.x). You'd have to simulate bi-directionality by adding the edge in the opposing direction in two separate requests.

/graphs/<graph>/edges/3?_outV=<id>&_label=friend&_inV=2&<key>=<key'>
/graphs/<graph>/edges/2?_outV=<id>&_label=friend&_inV=3&<key>=<key'>

Post Status

Asked in February 2016
Viewed 4,000 times
Voted 8
Answered 1 times

Search




Leave an answer


Quote of the day: live life