使用什么机制来确定tinkerpop/titan中顶点的绝对顺序?
What mechanism is used to determine the absolute order of vertices in tinkerpop/titan?
执行以下遍历时:
graph.addVertex("a")
graph.addVertex("b")
graph.addVertex("c")
graph.traversal().V().range(0,2)
graph.traversal().V().range(2,3)
什么决定了我在使用范围功能时取回这些顶点的顺序?我能保证得到所有三个顶点 a、b 和 c 吗?
如果没有明确的 order().by()
,您不应期待有保证的订单。
来自 TinkerPop 文档:
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).
执行以下遍历时:
graph.addVertex("a")
graph.addVertex("b")
graph.addVertex("c")
graph.traversal().V().range(0,2)
graph.traversal().V().range(2,3)
什么决定了我在使用范围功能时取回这些顶点的顺序?我能保证得到所有三个顶点 a、b 和 c 吗?
如果没有明确的 order().by()
,您不应期待有保证的订单。
来自 TinkerPop 文档:
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).