Reputation: 135
When performing the following traversals:
graph.addVertex("a")
graph.addVertex("b")
graph.addVertex("c")
graph.traversal().V().range(0,2)
graph.traversal().V().range(2,3)
What determines the order in which I get these vertices back when using the range functionality? Am I guaranteed to get all three vertices a, b and c back?
Upvotes: 5
Views: 68
Reputation: 10904
Without an explicit order().by()
you shouldn't expect a guaranteed order.
From the TinkerPop docs:
A Traversal’s result are never ordered unless explicitly by means of
order()
-step. Thus, never rely on the iteration order between TinkerPop3 releases and even within a release (as traversal optimizations may alter the flow).
Upvotes: 4