C# Класс 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.

Наследование: TokenFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

IncrementToken() публичный Метод

public IncrementToken ( ) : bool
Результат bool

PatternReplaceFilter() публичный Метод

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.
Результат Lucene.Net.Analysis.Tokenattributes