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

项目:Elasticsearch    文件:KeepWordFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    if (version.onOrAfter(Version.LUCENE_4_4)) {
        return new KeepWordFilter(tokenStream, keepWords);
    } else {
        @SuppressWarnings("deprecation")
        final TokenStream filter = new Lucene43KeepWordFilter(enablePositionIncrements, tokenStream, keepWords);
        return filter;
    }
}
项目:elasticsearch_my    文件:KeepWordFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    return new KeepWordFilter(tokenStream, keepWords);
}
项目:NYBC    文件:KeepWordFilterFactory.java   
@Override
public TokenStream create(TokenStream input) {
  // if the set is null, it means it was empty
  return words == null ? input : new KeepWordFilter(enablePositionIncrements, input, words);
}