Class EscapeQuerySyntax
Implementation of IEscapeQuerySyntax for the standard lucene syntax.
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Parser
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class EscapeQuerySyntax : IEscapeQuerySyntax
Methods
DiscardEscapeChar(string)
Returns a string where the escape char has been removed, or kept only once if there was a double escape.
Supports escaped unicode characters, e. g. translatesA
to
A
.
Declaration
public static UnescapedCharSequence DiscardEscapeChar(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input |
Returns
Type | Description |
---|---|
UnescapedCharSequence |
Escape(ICharSequence, CultureInfo, EscapeQuerySyntaxType)
Implementation of IEscapeQuerySyntax for the standard lucene syntax.
Declaration
public virtual ICharSequence Escape(ICharSequence text, CultureInfo locale, EscapeQuerySyntaxType type)
Parameters
Type | Name | Description |
---|---|---|
ICharSequence | text | text to be escaped |
CultureInfo | locale | locale for the current query |
EscapeQuerySyntaxType | type | select the type of escape operation to use |
Returns
Type | Description |
---|---|
ICharSequence | escaped text |
Escape(string, CultureInfo, EscapeQuerySyntaxType)
Implementation of IEscapeQuerySyntax for the standard lucene syntax.
Declaration
public virtual string Escape(string text, CultureInfo locale, EscapeQuerySyntaxType type)
Parameters
Type | Name | Description |
---|---|---|
string | text | text to be escaped |
CultureInfo | locale | locale for the current query |
EscapeQuerySyntaxType | type | select the type of escape operation to use |
Returns
Type | Description |
---|---|
string | escaped text |