0

I was able to get the path of a graph with the command below,

g.V('v6').repeat(out().simplePath()).until(hasId('v8')).path().limit(1)

gives,

==>[v[v6], v[v3], v[v1], v[v4], v[v8]]

I would like to print with the edges associated with the path. Tried few ways could not get it to print.

Kannaiyan
  • 12,554
  • 3
  • 44
  • 83

1 Answers1

0

Solved it by outE().inV()

g.V('v6').repeat(outE().inV().simplePath()).until(hasId('v8')).path().limit(1)

gives the vertices and their edges,

    [v[v6], e[es63][v6-sonof->v3], v[v3], 
e[esb34][v3-siblingof->v4], v[v4], 
e[es48][v4-daughterof->v8], v[v8]]
Kannaiyan
  • 12,554
  • 3
  • 44
  • 83