• API

    Show / Hide Table of Contents

    Class PatternReplaceCharFilter

    Lucene.Net.Analysis.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
    Lucene.Net.Analysis.CharFilter
    BaseCharFilter
    PatternReplaceCharFilter
    Implements
    System.IDisposable
    Inherited Members
    BaseCharFilter.LastCumulativeDiff
    BaseCharFilter.AddOffCorrectMap(Int32, Int32)
    Lucene.Net.Analysis.CharFilter.m_input
    CharFilter.Dispose(Boolean)
    CharFilter.CorrectOffset(Int32)
    CharFilter.Skip(Int32)
    Lucene.Net.Analysis.CharFilter.Reset()
    Lucene.Net.Analysis.CharFilter.IsReady
    Lucene.Net.Analysis.CharFilter.IsMarkSupported
    CharFilter.Mark(Int32)
    System.IO.TextReader.Null
    System.IO.TextReader.Close()
    System.IO.TextReader.Dispose()
    System.IO.TextReader.Peek()
    System.IO.TextReader.ReadAsync(System.Char[], System.Int32, System.Int32)
    System.IO.TextReader.ReadBlock(System.Char[], System.Int32, System.Int32)
    System.IO.TextReader.ReadBlockAsync(System.Char[], System.Int32, System.Int32)
    System.IO.TextReader.ReadLine()
    System.IO.TextReader.ReadLineAsync()
    System.IO.TextReader.ReadToEnd()
    System.IO.TextReader.ReadToEndAsync()
    System.IO.TextReader.Synchronized(System.IO.TextReader)
    System.MarshalByRefObject.GetLifetimeService()
    System.MarshalByRefObject.InitializeLifetimeService()
    System.MarshalByRefObject.MemberwiseClone(System.Boolean)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Analysis.Pattern
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class PatternReplaceCharFilter : BaseCharFilter, IDisposable

    Constructors

    | Improve this Doc View Source

    PatternReplaceCharFilter(Regex, String, Int32, String, TextReader)

    Declaration
    [Obsolete]
    public PatternReplaceCharFilter(Regex pattern, string replacement, int maxBlockChars, string blockDelimiter, TextReader in)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern
    System.String replacement
    System.Int32 maxBlockChars
    System.String blockDelimiter
    System.IO.TextReader in
    | Improve this Doc View Source

    PatternReplaceCharFilter(Regex, String, TextReader)

    Declaration
    public PatternReplaceCharFilter(Regex pattern, string replacement, TextReader in)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern
    System.String replacement
    System.IO.TextReader in

    Fields

    | Improve this Doc View Source

    DEFAULT_MAX_BLOCK_CHARS

    Declaration
    [Obsolete]
    public const int DEFAULT_MAX_BLOCK_CHARS = 10000
    Field Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Correct(Int32)

    Declaration
    protected override int Correct(int currentOff)
    Parameters
    Type Name Description
    System.Int32 currentOff
    Returns
    Type Description
    System.Int32
    Overrides
    BaseCharFilter.Correct(Int32)
    | Improve this Doc View Source

    Read()

    Declaration
    public override int Read()
    Returns
    Type Description
    System.Int32
    Overrides
    Lucene.Net.Analysis.CharFilter.Read()
    | Improve this Doc View Source

    Read(Char[], Int32, Int32)

    Declaration
    public override int Read(char[] cbuf, int off, int len)
    Parameters
    Type Name Description
    System.Char[] cbuf
    System.Int32 off
    System.Int32 len
    Returns
    Type Description
    System.Int32
    Overrides
    CharFilter.Read(Char[], Int32, Int32)

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)