GAE has a full-text search feature in trusted tester phase.
Alternatively (and this is what I do), create an indexed synthetic
list property which holds a union of all the words you want to be able
to match on. If you want to get fancy, you can Lucene to break up
words and phrases into pieces. Here's some code that others may find
helpful:
/** Uses lucene tokenizer to create a set of lowercase token words */
private static Set<String> tokenize(String input) {
try {
TokenStream tok = new StandardTokenizer(Version.LUCENE_35, new
StringReader(input));
tok = new LowerCaseFilter(Version.LUCENE_35, tok);
Set<String> result = Sets.newHashSet();
CharTermAttribute termAttr = tok.addAttribute(CharTermAttribute.class);
while (tok.incrementToken()) {
String term = termAttr.toString();
result.add(term);
}
return result;
} catch (IOException ex) {
throw new BetterIOException(ex);
}
}
As an aside, there's something wrong with your system if you have an
entity with 'DTO' in the classname. DTO = data transfer object,
called that because it isn't an entity.
Jeff