LuceneCompiler: term transformation helper.