indexOf Vertex with given property in a sorted list
Hi all!
I've been trying to create a paginated GET REST api and sometimes I need to enforce a
Let's say my gremlin query so far returns the following list of vertices, sorted based on some property comparison:
Is there a way of asking gremlin what is the index of vertex with id
Some pseudocode for clarity:
Thank you in advance
I've been trying to create a paginated GET REST api and sometimes I need to enforce a
range on the resulting vertices starting from a vertex matching a given ID.Let's say my gremlin query so far returns the following list of vertices, sorted based on some property comparison:
Is there a way of asking gremlin what is the index of vertex with id
K in the above list? Can all of this be done in a single query so that my final result simply returns the following, given K and a range of 3?Some pseudocode for clarity:
Thank you in advance