Class 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
Inheritance
System.Object
System.MarshalByRefObject
System.IO.TextReader
PatternReplaceCharFilter
Inherited Members
System.IO.TextReader.Null
System.IO.TextReader.Close()
System.IO.TextReader.Dispose()
System.IO.TextReader.Peek()
System.IO.TextReader.ReadToEnd()
System.IO.TextReader.ReadBlock(System.Char[], System.Int32, System.Int32)
System.IO.TextReader.ReadLine()
System.IO.TextReader.ReadLineAsync()
System.IO.TextReader.ReadToEndAsync()
System.IO.TextReader.ReadAsync(System.Char[], System.Int32, System.Int32)
System.IO.TextReader.ReadBlockAsync(System.Char[], System.Int32, System.Int32)
System.IO.TextReader.Synchronized(System.IO.TextReader)
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.CreateObjRef(System.Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
[Serializable]
public class PatternReplaceCharFilter : BaseCharFilter, IDisposable
Constructors
Name | Description |
---|---|
PatternReplaceCharFilter(Regex, String, Int32, String, TextReader) | |
PatternReplaceCharFilter(Regex, String, TextReader) |
Fields
Name | Description |
---|---|
DEFAULT_MAX_BLOCK_CHARS |
Methods
Name | Description |
---|---|
Correct(Int32) | |
Read() | |
Read(Char[], Int32, Int32) |