Java 类org.apache.lucene.analysis.pattern.PatternReplaceCharFilter 实例源码

项目:NYBC    文件:PatternReplaceCharFilterFactory.java   
@Override
public void init(Map<String, String> args) {
  super.init( args );
  p = getPattern("pattern");
  replacement = args.get( "replacement" );
  if( replacement == null )
    replacement = "";
  // TODO: warn if you set maxBlockChars or blockDelimiters ?
  maxBlockChars = getInt( "maxBlockChars", PatternReplaceCharFilter.DEFAULT_MAX_BLOCK_CHARS );
  blockDelimiters = args.get( "blockDelimiters" );
}
项目:elasticsearch_my    文件:PatternReplaceCharFilterFactory.java   
@Override
public Reader create(Reader tokenStream) {
    return new PatternReplaceCharFilter(pattern, replacement, tokenStream);
}
项目:Elasticsearch    文件:PatternReplaceCharFilterFactory.java   
@Override
public Reader create(Reader tokenStream) {
    return new PatternReplaceCharFilter(pattern, replacement, tokenStream);
}
项目:NYBC    文件:PatternReplaceCharFilterFactory.java   
@Override
public CharFilter create(Reader input) {
  return new PatternReplaceCharFilter( p, replacement, maxBlockChars, blockDelimiters, input );
}