blob: 856e02f55e6a57ee2b5accc35dcf7eaa6ca3f6ba [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse fuzzy1;
2
3declare type UserType as open {
4 uid: {{int32}},
5 name: string,
6 lottery_numbers: {{int32}},
7 interests: {{string}}
8}
9
10declare type VisitorType as open {
11 vid: {{int32}},
12 name: string,
13 lottery_numbers: {{int32}},
14 interests: {{string}}
15}
16
17declare nodegroup group1 on nc1, nc2;
18
19declare dataset Users(UserType)
ramangrover29669d8f62013-02-11 06:03:32 +000020 primary key uid on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000021declare dataset Visitors(VisitorType)
ramangrover29669d8f62013-02-11 06:03:32 +000022 primary key vid on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000023
24write output to nc1:'/tmp/users-visitors.adm';
25
26set simthreshold '.5';
27
28for $user in dataset('Users')
29for $visitor in dataset('Visitors')
30where $user.interests ~= $visitor.interests
31return { 'user': $user, 'visitor': $visitor }