blob: 4e6d919e162e655784c4bc765c4a0823f9b0f727 [file] [log] [blame]
drop dataverse fuzzyjoin if exists;
create dataverse fuzzyjoin;
use dataverse fuzzyjoin;
create type DBLPType as closed {
id: int32,
dblpid: string,
title: string,
authors: string,
misc: string
}
create dataset DBLP(DBLPType) primary key id;
load dataset DBLP
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/pub-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
write output to nc1:'rttest/fuzzyjoin_dblp-aqlplus_1.adm';
set simthreshold '.5f';
for $dblp in dataset('DBLP')
for $dblp2 in dataset('DBLP')
where word-tokens($dblp.title) ~= word-tokens($dblp2.title) and $dblp.id < $dblp2.id
order by $dblp.id, $dblp2.id
return {'dblp': $dblp, 'dblp2': $dblp2}