Java 类org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter 实例源码

项目:elasticsearch_my    文件:WordDelimiterTokenFilterFactory.java   
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;
}
项目:Elasticsearch    文件:WordDelimiterTokenFilterFactory.java   
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;
}
项目:elasticsearch_my    文件:WordDelimiterTokenFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
     return new WordDelimiterFilter(tokenStream,
                 charTypeTable,
                 flags,
                 protoWords);
}
项目:Elasticsearch    文件:WordDelimiterTokenFilterFactory.java   
@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);
     }
}
项目:NYBC    文件:WordDelimiterFilterFactory.java   
@Override
public WordDelimiterFilter create(TokenStream input) {
  return new WordDelimiterFilter(input, typeTable == null ? WordDelimiterIterator.DEFAULT_WORD_DELIM_TABLE : typeTable,
                                 flags, protectedWords);
}