/// <summary> /// what other users rated those videos highly /// </summary> public static GraphTraversal <Vertex, Vertex> OtherUserRatedVideos(this GraphTraversal <Vertex, Vertex> t, int minRate, int sample) { return // what other users rated those videos highly? (this is like saying "what users share my taste") (t.InE(EdgeRated).Has(PropertyRating, Gt(minRate)) // but don't grab too many, or this won't work OLTP, and "by('rating')" favors the higher ratings .Sample(sample).By(PropertyRating).OutV()); }
/// <summary> /// Traverses from a "movie" to a "rated" edge. /// </summary> public static GraphTraversal <Vertex, Edge> Ratings(this GraphTraversal <Vertex, Vertex> t) { return(t.InE(EdgeRated)); }