private static Byte parseType(String s) { if (s.equals("LOWER")) return WordDelimiterFilter.LOWER; else if (s.equals("UPPER")) return WordDelimiterFilter.UPPER; else if (s.equals("ALPHA")) return WordDelimiterFilter.ALPHA; else if (s.equals("DIGIT")) return WordDelimiterFilter.DIGIT; else if (s.equals("ALPHANUM")) return WordDelimiterFilter.ALPHANUM; else if (s.equals("SUBWORD_DELIM")) return WordDelimiterFilter.SUBWORD_DELIM; else return null; }
private Byte parseType(String s) { if (s.equals("LOWER")) return WordDelimiterFilter.LOWER; else if (s.equals("UPPER")) return WordDelimiterFilter.UPPER; else if (s.equals("ALPHA")) return WordDelimiterFilter.ALPHA; else if (s.equals("DIGIT")) return WordDelimiterFilter.DIGIT; else if (s.equals("ALPHANUM")) return WordDelimiterFilter.ALPHANUM; else if (s.equals("SUBWORD_DELIM")) return WordDelimiterFilter.SUBWORD_DELIM; else return null; }
@Override public TokenStream create(TokenStream tokenStream) { return new WordDelimiterFilter(tokenStream, charTypeTable, flags, protoWords); }
@Override public TokenStream create(TokenStream tokenStream) { if (version.onOrAfter(Version.LUCENE_4_8)) { return new WordDelimiterFilter(tokenStream, charTypeTable, flags, protoWords); } else { return new Lucene47WordDelimiterFilter(tokenStream, charTypeTable, flags, protoWords); } }
@Override public WordDelimiterFilter create(TokenStream input) { return new WordDelimiterFilter(input, typeTable == null ? WordDelimiterIterator.DEFAULT_WORD_DELIM_TABLE : typeTable, flags, protectedWords); }