Enum GeolocationSort.Mode
- java.lang.Object
-
- java.lang.Enum<GeolocationSort.Mode>
-
- co.elasticsearch.enterprisesearch.client.model.request.search.GeolocationSort.Mode
-
- All Implemented Interfaces:
Serializable,Comparable<GeolocationSort.Mode>
- Enclosing class:
- GeolocationSort
public static enum GeolocationSort.Mode extends Enum<GeolocationSort.Mode>
How to calculate distance in case a field has several geo points. By default, the shortest distance is taken into account when sorting in ascending order and the longest distance when sorting in descending order.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeolocationSort.ModefromValue(String value)Get a Mode from the string valueStringgetValue()static GeolocationSort.ModevalueOf(String name)Returns the enum constant of this type with the specified name.static GeolocationSort.Mode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MIN
public static final GeolocationSort.Mode MIN
Minimum
-
MAX
public static final GeolocationSort.Mode MAX
Maximum
-
MEDIAN
public static final GeolocationSort.Mode MEDIAN
Median
-
AVERAGE
public static final GeolocationSort.Mode AVERAGE
Average
-
-
Method Detail
-
values
public static GeolocationSort.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GeolocationSort.Mode c : GeolocationSort.Mode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeolocationSort.Mode valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromValue
public static GeolocationSort.Mode fromValue(String value)
Get a Mode from the string value- Parameters:
value- The value to match- Returns:
- The Mode with the matching value, otherwise an exception is thrown
-
getValue
public String getValue()
-
-