g.V().has("uuid", "f7405ad2").has("type", "car").order().by("lastModified", decr).values("lastModified").limit(local, 3)
==>1512615609790
==>1512615245766
g.V().has("uuid", "f7405ad2").has("type", "car").order().by("lastModified", decr).range(1, 1000).drop()
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/8e2d1217-883d-412c-b164-ea32b668e6f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
What about it do you want to avoid? You can do range(1,-1). 3.3 has skip(1).
Robert Dale
On Wed, Dec 6, 2017 at 11:04 PM, Alex LI <zhal...@gmail.com> wrote:
HIya,I have some duplicate vertex with same uuid (not the db id) and type, and every time when I lookup a existing vertex I want to drop the legacy vertex as well. I have the following gremlin query to do that but the `range` bit is something I am concern on or want to find a better way to do it.g.V().has("uuid", "f7405ad2").has("type", "car").order().by("lastModified", decr).values("lastModified").limit(local, 3)
==>1512615609790
==>1512615245766
So basically I want to remove every vertex except the fist vertex because the first vertex is the most up-do-date. (assume only 2 duplicate vertex in this example, but could be more)And I do:g.V().has("uuid", "f7405ad2").has("type", "car").order().by("lastModified", decr).range(1, 1000).drop()
this works, but the rang to 1000 is something I want to avoid. is there a better way to do it?Thanks and regards,Alex
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.