blob: 5e9ac0ed650f59b32ad034c399c2c288f8f37d09 [file] [log] [blame]
alexander.behmc576c602012-07-06 02:41:15 +00001/*
2 * Description : Tests whether an ngram_index is applied to optimize a selection query with ~= using Jaccard on 3-gram tokens.
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
ramangrover29669d8f62013-02-11 06:03:32 +000019create dataset DBLP(DBLPType) primary key id;
alexander.behmc576c602012-07-06 02:41:15 +000020
alexander.behmc576c602012-07-06 02:41:15 +000021create index ngram_index on DBLP(title) type ngram(3);
22
23write output to nc1:"rttest/inverted-index-basic_ngram-fuzzyeq-jaccard.adm";
24
25set simfunction 'jaccard';
26set simthreshold '0.8f';
27
28for $o in dataset('DBLP')
29where gram-tokens($o.title, 3, false) ~= gram-tokens("Transactions for Cooperative Environments", 3, false)
30return $o