blob: eee681a5db02ebe4dc82cad8681358d3f305a50b [file] [log] [blame]
/*
* Description : Tests whether a keyword index is applied to optimize a selection query using the contains function.
* The index should *not* be applied (see below).
* Success : Yes
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type DBLPType as closed {
id: int32,
dblpid: string,
title: string,
authors: string,
misc: string
}
create dataset DBLP(DBLPType) partitioned by key id;
create index keyword_index on DBLP(title) type keyword;
write output to nc1:"rttest/inverted-index-basic_word-contains.adm";
// Contains cannot be answered with a word inverted index.
for $o in dataset('DBLP')
where contains($o.title, "Multimedia")
order by $o.id
return $o