C# Class Lucene.Net.Analysis.Reverse.ReverseStringFilter

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

If 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 Version compatibility when creating ReverseStringFilter, or when using any of its static methods:

  • As of 3.1, supplementary characters are handled correctly

Inheritance: TokenFilter
Exibir arquivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
IncrementToken ( ) : bool
Reverse ( LuceneVersion matchVersion, string input ) : string

Reverses the given input string

Reverse ( LuceneVersion matchVersion, char buffer ) : void

Reverses the given input buffer in-place

Reverse ( LuceneVersion matchVersion, char buffer, int len ) : void

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

Reverse ( LuceneVersion matchVersion, char buffer, int start, int len ) : void

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

ReverseStringFilter ( LuceneVersion matchVersion, TokenStream @in ) : Lucene.Net.Analysis.Tokenattributes

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

The reversed tokens will not be marked.

ReverseStringFilter ( LuceneVersion matchVersion, TokenStream @in, char marker ) : Lucene.Net.Analysis.Tokenattributes

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.

Private Methods

Method Description
ReverseUnicode3 ( char buffer, int start, int len ) : void

Method Details

IncrementToken() public method

public IncrementToken ( ) : bool
return bool

Reverse() public static method

Reverses the given input string
public static Reverse ( LuceneVersion matchVersion, string input ) : string
matchVersion LuceneVersion See above
input string the string to reverse
return string

Reverse() public static method

Reverses the given input buffer in-place
public static Reverse ( LuceneVersion matchVersion, char buffer ) : void
matchVersion LuceneVersion See above
buffer char the input char array to reverse
return void

Reverse() public static method

Partially reverses the given input buffer in-place from offset 0 up to the given length.
public static Reverse ( LuceneVersion matchVersion, char buffer, int len ) : void
matchVersion LuceneVersion See above
buffer char the input char array to reverse
len int the length in the buffer up to where the /// buffer should be reversed
return void

Reverse() public static method

Partially reverses the given input buffer in-place from the given offset up to the given length.
public static Reverse ( LuceneVersion matchVersion, char buffer, int start, int len ) : void
matchVersion LuceneVersion See above
buffer char the input char array to reverse
start int the offset from where to reverse the buffer
len int the length in the buffer up to where the /// buffer should be reversed
return void

ReverseStringFilter() public method

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

The reversed tokens will not be marked.

public ReverseStringFilter ( LuceneVersion matchVersion, TokenStream @in ) : Lucene.Net.Analysis.Tokenattributes
matchVersion LuceneVersion See above
@in TokenStream
return Lucene.Net.Analysis.Tokenattributes

ReverseStringFilter() public method

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.

public ReverseStringFilter ( LuceneVersion matchVersion, TokenStream @in, char marker ) : Lucene.Net.Analysis.Tokenattributes
matchVersion LuceneVersion See above
@in TokenStream
marker char A character used to mark reversed tokens
return Lucene.Net.Analysis.Tokenattributes