...groupCount().cap().next().sort { a, b -> b.value <=> a.value ?: a.key.anotherProp <=> b.key.anotherProp }.collect { it.key }[0..<10]
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/5f14a29d-c7f8-42d7-8438-983158736561%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It's just that I'm translating your suggestions to JVM and there I get an Object after Next.
So, what you suggest is to iterate the result after the groupCount and then to sort externally to the gremlin pipeline.
I could just use Collections.sort in Java. right?
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/29d94e75-4acb-4861-9839-98ce574d3ad7%40googlegroups.com.
pipe.start(someVertex).out().out().groupCount().cap().orderMap(T.decr).map().toList()
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/d4fb5fe3-2c27-4e0e-8f26-ade8f8b8c7c9%40googlegroups.com.