// returns a prefiltered list of elements; you still need to do a
// full-text search on those.
// If it returns null, you have to search all elements
static Cl wordIndex_lookupString(WordIndex index, S query) {
L ranges = index.wordRanges(query);
new Lowest> best;
for (IntRange r : ranges) {
S word = substring(query, r);
Cl l;
if (r.start == 0)
l = mmGetAllAsSet(index.index, endingWithIC(index.words(), word));
else if (r.end == l(query))
l = mmGetAllAsSet(index.index, startingWithIC(index.words(), word));
else
l = index.get(word);
best.put(l, l(l));
}
ret best!;
}