Hi,
g.V(1).as(‘a’).
V(2).as(‘b’).
shortestPath().from(‘a’).to(‘b’).
by(outE(‘knows’).has(’since’,lt(2010)).inV()).
path()
Is equivalent to:
g.V(1).as(‘a’).
V(2).as(‘b’).
repeat(outE(‘knows’).has(’since’,lt(2010)).inV()).until(where(‘a’)).limit(1).
path()
However, for the Gremlin-Java VM a BiDirectionalSearchStep could then be added
in the compilation as a more optimal way of doing this.
Basically, should we be adding more high-order constructs for common
patterns….? If so, what other common patterns do you know of that we should
make steps?
Marko.
http://markorodriguez.com