/// <summary> /// what other users rated those videos highly /// </summary> public static GraphTraversal <Vertex, Vertex> VideosRatedByOthers(this GraphTraversal <Vertex, Vertex> t, int minRate, long minLocalRate) { return // Now we're working with "similar users". For those users who share my taste, grab N highly rated // videos. Save the rating so we can sum the scores later, and use sack() because it does not require // path information. (as()/select() was slow) (t.Local <List <Vertex> >( __.OutE(EdgeRated) .Has(PropertyRating, Gt(minRate)) .Limit(minLocalRate)) .Sack(Operator.Assign) .By(PropertyRating).InV()); }