Package org.elasticsearch.index.query
Enum Class GeoValidationMethod
- All Implemented Interfaces:
Serializable
,Comparable<GeoValidationMethod>
,Constable
,Writeable
This enum is used to determine how to deal with invalid geo coordinates in geo related
queries:
On STRICT validation invalid coordinates cause an exception to be thrown.
On IGNORE_MALFORMED invalid coordinates are being accepted.
On COERCE invalid coordinates are being corrected to the most likely valid coordinate.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeoValidationMethod
fromString(String op)
static GeoValidationMethod
infer(boolean coerce, boolean ignoreMalformed)
Returns validation method corresponding to given coerce and ignoreMalformed values.static boolean
isCoerce(GeoValidationMethod method)
Returns whether or not to try and fix broken/wrapping bounding boxes.static boolean
isIgnoreMalformed(GeoValidationMethod method)
Returns whether or not to skip bounding box validation.static GeoValidationMethod
static GeoValidationMethod
Returns the enum constant of this class with the specified name.static GeoValidationMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Enum Constant Details
-
COERCE
-
IGNORE_MALFORMED
-
STRICT
-
-
Field Details
-
DEFAULT
-
DEFAULT_LENIENT_PARSING
public static final boolean DEFAULT_LENIENT_PARSING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
readFromStream
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
fromString
-
isIgnoreMalformed
Returns whether or not to skip bounding box validation. -
isCoerce
Returns whether or not to try and fix broken/wrapping bounding boxes. -
infer
Returns validation method corresponding to given coerce and ignoreMalformed values.
-