如何用graph scope进行分页 #2449
-
想要按照按顶点的某个属性排序,如下: 现在想取按address排序后第10~20个,或者20~30个,做一个分页的功能,有什么解决办法吗 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Thanks for opening your first issue here! Be sure to follow the issue template! And a maintainer will get back to you shortly! |
Beta Was this translation helpful? Give feedback.
-
Maybe you could use t = g.V().order().by('address', asc)
t.next(10)
t.next(10) |
Beta Was this translation helpful? Give feedback.
-
Please use bytecode mode, as follows: g = interactive.traversal_source()
t = g.V().order().by('address', asc)
print(t.next(10))
print(t.next(10)) I'm not an expert of gremlin, perhaps @shirly121 could show how to use pagination in script mode. |
Beta Was this translation helpful? Give feedback.
Please use bytecode mode, as follows:
I'm not an expert of gremlin, perhaps @shirly121 could show how to use pagination in script mode.