Class EscapeQuerySyntaxImpl
java.lang.Object
org.apache.lucene.queryparser.flexible.standard.parser.EscapeQuerySyntaxImpl
- All Implemented Interfaces:
EscapeQuerySyntax
Implementation of
EscapeQuerySyntax for the standard lucene syntax.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.queryparser.flexible.core.parser.EscapeQuerySyntax
EscapeQuerySyntax.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnescapedCharSequencediscardEscapeChar(CharSequence input) Returns a String where the escape char has been removed, or kept only once if there was a double escape.escape(CharSequence text, Locale locale, EscapeQuerySyntax.Type type)
-
Constructor Details
-
EscapeQuerySyntaxImpl
public EscapeQuerySyntaxImpl()
-
-
Method Details
-
escape
- Specified by:
escapein interfaceEscapeQuerySyntax- Parameters:
text- - text to be escapedlocale- - locale for the current querytype- - select the type of escape operation to use- Returns:
- escaped text
-
discardEscapeChar
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. translates
\u0041toA.- Throws:
ParseException
-