blob: f71a00c1709f2971e8d72951a51a402f56569085 [file] [log] [blame]
buyingyi2fd7fa62014-11-24 19:31:55 -08001from $user in dataset('Users')
2with $similar_users :=
3 from $similar_user in dataset('Users')
4 with $similarity := jaccard_similarity($user.interests, $similar_user.interests)
5 where $user != $similar_user
6 and $similarity >= .75
7 order by $similarity desc
8 limit 10
9 select { "user_name" : $similar_user.name, "similarity" : $similarity }
10select { "user_name" : $user.name, "similar_users" : $similar_users }