public class ElasticsearchBooleanBridge extends Object implements EncodingBridge, TwoWayStringBridge, IgnoreAnalyzerBridge
String
.
Behaves the same as Lucene's BooleanBridge, except the format of indexNullAs strings is checked, so one cannot use a random string as null token.
Modifier and Type | Field and Description |
---|---|
static ElasticsearchBooleanBridge |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
NullMarker |
createNullMarker(String indexNullAs) |
NumericFieldSettingsDescriptor.NumericEncodingType |
getEncodingType()
Define the numeric encoding to use for the brdige.
|
String |
objectToString(Object object)
Converts the object representation to a string.
|
protected Boolean |
parseIndexNullAs(String indexNullAs) |
Boolean |
stringToObject(String stringValue)
Convert the index string representation to an object.
|
public static final ElasticsearchBooleanBridge INSTANCE
public Boolean stringToObject(String stringValue)
TwoWayStringBridge
stringToObject
in interface TwoWayStringBridge
stringValue
- The index value.Object
.public String objectToString(Object object)
StringBridge
objectToString
in interface StringBridge
object
- The object to transform into a string representation.null
. It can be empty though.public NumericFieldSettingsDescriptor.NumericEncodingType getEncodingType()
EncodingBridge
getEncodingType
in interface EncodingBridge
NumericFieldSettingsDescriptor.NumericEncodingType.UNKNOWN
if
this bridge does not use numeric encoding.protected Boolean parseIndexNullAs(String indexNullAs) throws IllegalArgumentException
IllegalArgumentException
public NullMarker createNullMarker(String indexNullAs) throws IllegalArgumentException
createNullMarker
in interface EncodingBridge
indexNullAs
- The value of Field.indexNullAs()
.IllegalArgumentException
- If indexNullAs
cannot be encoded in the required format.Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved