blob: 3a3d7bbcdc7230bd2d267c038f37c34b0220702b [file] [log] [blame]
vinayakb5ee049d2013-04-06 21:21:29 +00001/*
2 * Description : Tests whether an ngram_index is applied to optimize a selection query with ~= using edit-distance on strings.
3 * The index should be applied.
4 * Success : Yes
5 */
6
7drop dataverse test if exists;
8create dataverse test;
9use dataverse test;
10
11create type DBLPType as closed {
12 id: int32,
13 dblpid: string,
14 title: string,
15 authors: string,
16 misc: string
17}
18
19create dataset DBLP(DBLPType) primary key id;
20
21create index ngram_index on DBLP(authors) type ngram(3);
22
23write output to nc1:"rttest/inverted-index-basic_ngram-fuzzyeq-edit-distance.adm";
24
25set simfunction 'edit-distance';
26set simthreshold '1';
27
28for $o in dataset('DBLP')
29where $o.authors ~= "Amihay Motro"
30return $o