I use Titan Graph Database (0.4.1 release). I have a directed graph and I am trying to find the neighbors of a node. I use the GremlinPipeLine with the following code:
GremlinPipeline<String, Vertex> pipe = new GremlinPipeline<String, Vertex>(vertex).both("similar");
I suppose that this is caused because if I have the following edge list of a directed graph
1 32
32 1
the above function return node 32 two times. Is there a way to filter this with the GremlinPipeline or should I do it manually?
P.S. any other way to find the neighbors of a node is also accepted.