Class GeoLocationSort
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.GeoLocationSort
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeoLocationSort.Mode
-
Constructor Summary
Constructors Constructor Description GeoLocationSort(GeoLocation geoLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoLocationgetCenter()Center point will be used to calculate the distance from that point to the field in each document, and return the results ordered by distance.GeoLocationSort.ModegetMode()How to calculate distance in case a field has several geo points.Sort.OrdergetOrder()GeoLocationSortsetMode(GeoLocationSort.Mode mode)How to calculate distance in case a field has several geo points.GeoLocationSortsetOrder(Sort.Order order)The sort order
-
-
-
Constructor Detail
-
GeoLocationSort
public GeoLocationSort(GeoLocation geoLocation)
-
-
Method Detail
-
getOrder
public Sort.Order getOrder()
-
getCenter
public GeoLocation getCenter()
Center point will be used to calculate the distance from that point to the field in each document, and return the results ordered by distance. Center point can be specified using any of the geolocation field formats, see geolocation fields.- Returns:
- the center
-
getMode
public GeoLocationSort.Mode getMode()
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.- Returns:
- the sort mode
-
setMode
public GeoLocationSort setMode(GeoLocationSort.Mode 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.- Parameters:
mode- the sort mode- Returns:
this.
-
setOrder
public GeoLocationSort setOrder(Sort.Order order)
The sort order- Parameters:
order- the sort order- Returns:
this.
-
-