Class ReverseStringFilter
Reverse token string, for example "country" => "yrtnuoc".
If Lucene.
You must specify the required Lucene.
- As of 3.1, supplementary characters are handled correctly
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.Analysis.Reverse
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class ReverseStringFilter : TokenFilter, IDisposable
Constructors
| Improve this Doc View SourceReverseStringFilter(LuceneVersion, TokenStream)
Create a new Reverse
The reversed tokens will not be marked.
Declaration
public ReverseStringFilter(LuceneVersion matchVersion, TokenStream in)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
Lucene. |
in | Lucene. |
ReverseStringFilter(LuceneVersion, TokenStream, Char)
Create a new Reverse
The reversed tokens will be prepended (marked) by the marker
character.
Declaration
public ReverseStringFilter(LuceneVersion matchVersion, TokenStream in, char marker)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
Lucene. |
in | Lucene. |
System. |
marker | A character used to mark reversed tokens |
Fields
| Improve this Doc View SourceINFORMATION_SEPARATOR_MARKER
Example marker character: U+001F (INFORMATION SEPARATOR ONE)
Declaration
public const char INFORMATION_SEPARATOR_MARKER = '\u001f'
Field Value
Type | Description |
---|---|
System. |
PUA_EC00_MARKER
Example marker character: U+EC00 (PRIVATE USE AREA: EC00)
Declaration
public const char PUA_EC00_MARKER = ''
Field Value
Type | Description |
---|---|
System. |
RTL_DIRECTION_MARKER
Example marker character: U+200F (RIGHT-TO-LEFT MARK)
Declaration
public const char RTL_DIRECTION_MARKER = ''
Field Value
Type | Description |
---|---|
System. |
START_OF_HEADING_MARKER
Example marker character: U+0001 (START OF HEADING)
Declaration
public const char START_OF_HEADING_MARKER = '\u0001'
Field Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceIncrementToken()
Declaration
public override bool IncrementToken()
Returns
Type | Description |
---|---|
System. |
Overrides
Reverse(LuceneVersion, Char[])
Reverses the given input buffer in-place
Declaration
public static void Reverse(LuceneVersion matchVersion, char[] buffer)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
System. |
buffer | the input char array to reverse |
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 |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
System. |
buffer | the input char array to reverse |
System. |
len | the length in the buffer up to where the buffer should be reversed |
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 |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
System. |
buffer | the input char array to reverse |
System. |
start | the offset from where to reverse the buffer |
System. |
len | the length in the buffer up to where the buffer should be reversed |
Reverse(LuceneVersion, String)
Reverses the given input string
Declaration
public static string Reverse(LuceneVersion matchVersion, string input)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion | lucene compatibility version |
System. |
input | the string to reverse |
Returns
Type | Description |
---|---|
System. |
the given input string in reversed order |