I have a vertex A -> B . I have multiple outgoing/incoming edges created between these two edges with same label.
When i query to get the neighbour vertex ,it is giving me duplicate vertex for each edges it has to the other vertex.
example :
gremlin> graph.traversal().V().has('ID', 'a').both("interference")
==>v[2]
==>v[2]
==>v[2]
==>v[2]
==>v[2]
==>v[2]
http://gremlinbin.com/bin/view/58087f51ba0d5
I do not need the duplicate vertex if it has multiple edges .
That's what the dedup()
step is for:
gremlin> graph.traversal().V().has('ID', 'a').both("interference").dedup()
==>v[2]