Package org.elasticsearch.index.query
Enum GeoValidationMethod
- java.lang.Object
-
- java.lang.Enum<GeoValidationMethod>
-
- org.elasticsearch.index.query.GeoValidationMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GeoValidationMethod>
,java.lang.constant.Constable
,Writeable
public enum GeoValidationMethod extends java.lang.Enum<GeoValidationMethod> implements 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
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COERCE
IGNORE_MALFORMED
STRICT
-
Field Summary
Fields Modifier and Type Field Description static GeoValidationMethod
DEFAULT
static boolean
DEFAULT_LENIENT_PARSING
-
Method Summary
Modifier and Type Method Description static GeoValidationMethod
fromString(java.lang.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
readFromStream(StreamInput in)
static GeoValidationMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GeoValidationMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
-
-
Enum Constant Detail
-
COERCE
public static final GeoValidationMethod COERCE
-
IGNORE_MALFORMED
public static final GeoValidationMethod IGNORE_MALFORMED
-
STRICT
public static final GeoValidationMethod STRICT
-
-
Field Detail
-
DEFAULT
public static final GeoValidationMethod DEFAULT
-
DEFAULT_LENIENT_PARSING
public static final boolean DEFAULT_LENIENT_PARSING
-
-
Method Detail
-
values
public static GeoValidationMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeoValidationMethod valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
readFromStream
public static GeoValidationMethod readFromStream(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
fromString
public static GeoValidationMethod fromString(java.lang.String op)
-
isIgnoreMalformed
public static boolean isIgnoreMalformed(GeoValidationMethod method)
Returns whether or not to skip bounding box validation.
-
isCoerce
public static boolean isCoerce(GeoValidationMethod method)
Returns whether or not to try and fix broken/wrapping bounding boxes.
-
infer
public static GeoValidationMethod infer(boolean coerce, boolean ignoreMalformed)
Returns validation method corresponding to given coerce and ignoreMalformed values.
-
-