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
-
Method Summary
Modifier and TypeMethodDescriptionstatic UnescapedCharSequence
discardEscapeChar
(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:
escape
in 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
A
toA
.- Throws:
ParseException
-