Hi I am new to Tinkerpop and Gremlin and I am struggling with a traversal I am trying to perform.
Basically I have a set of vertex ids which I want to traverse from and find a set of vertices from certain out edges. I want to associate the vertices following the out edges with the veracity it came from. For example:
v1 -> e1 -> v2
v1 -> e2 -> v4
v3 -> e3 -> v5
v3 -> e4 -> v6
So v1 has 2 out going edges (e1 and e2) to v2 and v4 and v3 has 2 out going edges (e3 and e4) to v5 and v6. What I want is to get a result of a traversal that would look something like this
[[[v1],[v2,v4]],[v3,[v5,v5]]]
Can someone help me with a traversal using Gremlin that would help me get that result? The closest I have come is with something like this
graph.traversal().V(4264,40964144).as('people').map{it.get().vertices(OUT, 'codes_in')}.as('languages').union(select('people'), select('languages'))