blob: c9f072abe63a4f8a32a802de5eaa9c154ac0f033 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse demo_aql;
2
3declare type DBLPType as open {
4 id: int32,
5 dblpid: string,
6 title: string,
7 authors: string,
8 misc: string
9}
10
11declare nodegroup group1 on rainbow-01, rainbow-02, rainbow-03, rainbow-04, rainbow-05;
12
13declare dataset DBLP(DBLPType)
14 partitioned by key id on group1;
15
16write output to rainbow-01:"/home/onose/hyracks-rainbow/results/102-fuzzy-select.adm";
17
18for $x in dataset('DBLP')
19let $ed := edit-distance($x.authors, "Michael Carey")
20where $ed <= 3
21order by $ed, $x.authors
22return { "edit-distance":$ed, "authors":$x.authors, "title":$x.title }