newbie question: find vertex with most edges

12 views
Skip to first unread message

Topping Bowers

unread,
Apr 24, 2013, 5:55:31 PM4/24/13
to pacer...@googlegroups.com
Hi all,

I have a fairly newbie question... i'm trying to find the vertex that has the most in edges... but I'm having trouble finding the right incantation of pipes... 

I have 

Graph::User --> Graph::Link

and I want to find the link that has the most user links...

g.v("@class" => "Graph%3A%3ALink").in.group_count will give me a hash of user_ids with a count

g.v("@class" => "Graph%3A%3ALink").map {|l| {url: l.properties['url']}}.group_count  seems to actually do what I want, but will return me *all* the urls with a count.

Is there anyway to get "just the max 10" or something?

Thanks so much for your help!

Topper
Reply all
Reply to author
Forward
0 new messages