Show / Hide Table of Contents

    Class ReverseStringFilter

    Reverse token string, for example "country" => "yrtnuoc".

    If Lucene.Net.Analysis.Reverse.ReverseStringFilter.marker is supplied, then tokens will be also prepended by that character. For example, with a marker of \u0001, "country" => "\u0001yrtnuoc". This is useful when implementing efficient leading wildcards search.

    You must specify the required LuceneVersion compatibility when creating ReverseStringFilter, or when using any of its static methods:

    • As of 3.1, supplementary characters are handled correctly

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    TokenFilter
    ReverseStringFilter
    Implements
    IDisposable
    Inherited Members
    TokenFilter.m_input
    TokenFilter.End()
    TokenFilter.Dispose(Boolean)
    TokenFilter.Reset()
    TokenStream.Dispose()
    AttributeSource.GetAttributeFactory()
    AttributeSource.GetAttributeClassesEnumerator()
    AttributeSource.GetAttributeImplsEnumerator()
    AttributeSource.AddAttributeImpl(Attribute)
    AttributeSource.AddAttribute<T>()
    AttributeSource.HasAttributes
    AttributeSource.HasAttribute<T>()
    AttributeSource.GetAttribute<T>()
    AttributeSource.ClearAttributes()
    AttributeSource.CaptureState()
    AttributeSource.RestoreState(AttributeSource.State)
    AttributeSource.GetHashCode()
    AttributeSource.Equals(Object)
    AttributeSource.ReflectAsString(Boolean)
    AttributeSource.ReflectWith(IAttributeReflector)
    AttributeSource.CloneAttributes()
    AttributeSource.CopyTo(AttributeSource)
    AttributeSource.ToString()
    Namespace: Lucene.Net.Analysis.Reverse
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class ReverseStringFilter : TokenFilter, IDisposable

    Constructors

    | Improve this Doc View Source

    ReverseStringFilter(LuceneVersion, TokenStream)

    Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.

    The reversed tokens will not be marked.

    Declaration
    public ReverseStringFilter(LuceneVersion matchVersion, TokenStream in)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    TokenStream in

    TokenStream to filter

    | Improve this Doc View Source

    ReverseStringFilter(LuceneVersion, TokenStream, Char)

    Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.

    The reversed tokens will be prepended (marked) by the marker character.

    Declaration
    public ReverseStringFilter(LuceneVersion matchVersion, TokenStream in, char marker)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    TokenStream in

    TokenStream to filter

    System.Char marker

    A character used to mark reversed tokens

    Fields

    | Improve this Doc View Source

    INFORMATION_SEPARATOR_MARKER

    Example marker character: U+001F (INFORMATION SEPARATOR ONE)

    Declaration
    public const char INFORMATION_SEPARATOR_MARKER = null
    Field Value
    Type Description
    System.Char
    | Improve this Doc View Source

    PUA_EC00_MARKER

    Example marker character: U+EC00 (PRIVATE USE AREA: EC00)

    Declaration
    public const char PUA_EC00_MARKER = null
    Field Value
    Type Description
    System.Char
    | Improve this Doc View Source

    RTL_DIRECTION_MARKER

    Example marker character: U+200F (RIGHT-TO-LEFT MARK)

    Declaration
    public const char RTL_DIRECTION_MARKER = null
    Field Value
    Type Description
    System.Char
    | Improve this Doc View Source

    START_OF_HEADING_MARKER

    Example marker character: U+0001 (START OF HEADING)

    Declaration
    public const char START_OF_HEADING_MARKER = null
    Field Value
    Type Description
    System.Char

    Methods

    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    Overrides
    TokenStream.IncrementToken()
    | Improve this Doc View Source

    Reverse(LuceneVersion, Char[])

    Reverses the given input buffer in-place

    Declaration
    public static void Reverse(LuceneVersion matchVersion, char[] buffer)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    System.Char[] buffer

    the input char array to reverse

    | Improve this Doc View Source

    Reverse(LuceneVersion, Char[], Int32)

    Partially reverses the given input buffer in-place from offset 0 up to the given length.

    Declaration
    public static void Reverse(LuceneVersion matchVersion, char[] buffer, int len)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    System.Char[] buffer

    the input char array to reverse

    System.Int32 len

    the length in the buffer up to where the buffer should be reversed

    | Improve this Doc View Source

    Reverse(LuceneVersion, Char[], Int32, Int32)

    Partially reverses the given input buffer in-place from the given offset up to the given length.

    Declaration
    public static void Reverse(LuceneVersion matchVersion, char[] buffer, int start, int len)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    System.Char[] buffer

    the input char array to reverse

    System.Int32 start

    the offset from where to reverse the buffer

    System.Int32 len

    the length in the buffer up to where the buffer should be reversed

    | Improve this Doc View Source

    Reverse(LuceneVersion, String)

    Reverses the given input string

    Declaration
    public static string Reverse(LuceneVersion matchVersion, string input)
    Parameters
    Type Name Description
    LuceneVersion matchVersion

    lucene compatibility version

    System.String input

    the string to reverse

    Returns
    Type Description
    System.String

    the given input string in reversed order

    Implements

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