C# 클래스 Lucene.Net.Analysis.Pattern.PatternReplaceCharFilter

CharFilter that uses a regular expression for the target of replace string. The pattern match will be done in each "block" in char stream.

ex1) source="aa  bb aa bb", pattern="(aa)\\s+(bb)" replacement="$1#$2"
output="aa#bb aa#bb"

NOTE: If you produce a phrase that has different length to source string and the field is used for highlighting for a term of the phrase, you will face a trouble.

ex2) source="aa123bb", pattern="(aa)\\d+(bb)" replacement="$1 $2"
output="aa bb"
and you want to search bb and highlight it, you will get
highlight snippet="aa1<em>23bb</em>"

@since Solr 1.5
상속: Lucene.Net.Analysis.CharFilters.BaseCharFilter
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
PatternReplaceCharFilter ( Regex pattern, string replacement, TextReader @in ) : Lucene.Net.Analysis.CharFilters
Read ( ) : int
Read ( char cbuf, int off, int len ) : int

보호된 메소드들

메소드 설명
Correct ( int currentOff ) : int

비공개 메소드들

메소드 설명
Fill ( ) : void
PatternReplaceCharFilter ( Regex pattern, string replacement, int maxBlockChars, string blockDelimiter, TextReader @in ) : Lucene.Net.Analysis.CharFilters
ProcessPattern ( StringBuilder input ) : string

Replace pattern in input and mark correction offsets.

메소드 상세

Correct() 보호된 메소드

protected Correct ( int currentOff ) : int
currentOff int
리턴 int

PatternReplaceCharFilter() 공개 메소드

public PatternReplaceCharFilter ( Regex pattern, string replacement, TextReader @in ) : Lucene.Net.Analysis.CharFilters
pattern System.Text.RegularExpressions.Regex
replacement string
@in TextReader
리턴 Lucene.Net.Analysis.CharFilters

Read() 공개 메소드

public Read ( ) : int
리턴 int

Read() 공개 메소드

public Read ( char cbuf, int off, int len ) : int
cbuf char
off int
len int
리턴 int