blob: 8bfc8787a1dea3b9891662bbddd296608cf9401b [file] [log] [blame]
alexander.behma9faa612012-11-24 22:38:05 +00001drop dataverse test if exists;
2create dataverse test;
3use dataverse test;
4
5create type DBLPType as closed {
6 id: int32,
7 dblpid: string,
8 title: string,
9 authors: string,
10 misc: string
11}
12
13create nodegroup group1 if not exists on nc1, nc2;
14
15create dataset DBLP(DBLPType)
16 partitioned by key id on group1;
17
18load dataset DBLP
19using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
20(("path"="nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":")) pre-sorted;
21
22create index ngram_index on DBLP(authors) type fuzzy ngram(3);
23
24write output to nc1:"rttest/index-selection_fuzzy-inverted-index-ngram-edit-distance-panic.adm";
25
26for $o in dataset('DBLP')
27let $ed := edit-distance-check($o.authors, "Amihay Motro", 5)
28where $ed[0]
29return $o