protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
Tokenizer source;
TokenStream stream;
if("_name_prefix".equals(fieldName)) {
source = new NGramTokenizer(reader,mingram,maxgram);
stream = new WordDelimiterFilter(new LowerCaseFilter(Version.LUCENE_43,source), WordDelimiterFilter.ALPHANUM, CharArraySet.EMPTY_SET);
} else if(fieldName.startsWith("_ngram_")) {
source = new NGramTokenizer(reader,3,4);
stream = null;
} else {
source = new WhitespaceTokenizer(Version.LUCENE_43,reader);
stream = new WordDelimiterFilter(new LowerCaseFilter(Version.LUCENE_43,source), WordDelimiterFilter.ALPHANUM, CharArraySet.EMPTY_SET);
}