So my question is, after traversal, I have got several paths, a path looks like node1-edge1-node2-edge2-node3, now I want to attach a property called ‘frequency’ to this specific path, and its values equals edge1’s ‘frequency’ property value, how should I do it? Or it cannot be done using Gremlin, and I have to use Java?
I tried something like this:
g.E().has('length', gt(1)).as('edge1')
.outV().as('node1')
.select('edge1')
.inV().as('node2')
.outE().as('edge2').where('edge1', eq('edge2').by('id'))
.inV().as('node3')
.path()