blob: d5e71e63e240f31c1602c8d379620c74f2244a4a [file] [log] [blame]
for $user in dataset('Users')
let $similar_users :=
for $similar_user in dataset('Users')
let $similarity := jaccard_similarity($user.interests, $similar_user.interests)
where $user != $similar_user
and $similarity >= .75
order by $similarity desc
limit 10
return { "user_name" : $similar_user.name, "similarity" : $similarity }
return { "user_name" : $user.name, "similar_users" : $similar_users }