C# Class Lucene.Net.Analysis.Pattern.PatternReplaceFilter

A TokenFilter which applies a Pattern to each token in the stream, replacing match occurances with the specified replacement string.

Note: Depending on the input and the pattern used and the input TokenStream, this TokenFilter may produce Tokens whose text is the empty string.

Inheritance: TokenFilter
Datei anzeigen Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
IncrementToken ( ) : bool
PatternReplaceFilter ( TokenStream @in, Regex pattern, string replacement, bool all ) : Lucene.Net.Analysis.Tokenattributes

Constructs an instance to replace either the first, or all occurances

Method Details

IncrementToken() public method

public IncrementToken ( ) : bool
return bool

PatternReplaceFilter() public method

Constructs an instance to replace either the first, or all occurances
public PatternReplaceFilter ( TokenStream @in, Regex pattern, string replacement, bool all ) : Lucene.Net.Analysis.Tokenattributes
@in TokenStream
pattern System.Text.RegularExpressions.Regex the pattern (a object) to apply to each Token
replacement string the "replacement string" to substitute, if null a /// blank string will be used. Note that this is not the literal /// string that will be used, '$' and '\' have special meaning.
all bool if true, all matches will be replaced otherwise just the first match.
return Lucene.Net.Analysis.Tokenattributes