blob: 856e02f55e6a57ee2b5accc35dcf7eaa6ca3f6ba [file] [log] [blame]
use dataverse fuzzy1;
declare type UserType as open {
uid: {{int32}},
name: string,
lottery_numbers: {{int32}},
interests: {{string}}
}
declare type VisitorType as open {
vid: {{int32}},
name: string,
lottery_numbers: {{int32}},
interests: {{string}}
}
declare nodegroup group1 on nc1, nc2;
declare dataset Users(UserType)
primary key uid on group1;
declare dataset Visitors(VisitorType)
primary key vid on group1;
write output to nc1:'/tmp/users-visitors.adm';
set simthreshold '.5';
for $user in dataset('Users')
for $visitor in dataset('Visitors')
where $user.interests ~= $visitor.interests
return { 'user': $user, 'visitor': $visitor }