Refactoring to fit into Lucene suggester framework