Class GeolocationFilter
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.filter.GeolocationFilter
-
- All Implemented Interfaces:
FieldFilter,Filter
public class GeolocationFilter extends Object implements Filter, FieldFilter
Represents a Geolocation Filter on a search request
-
-
Constructor Summary
Constructors Constructor Description GeolocationFilter(String name)Create a GeolocationFilter with the given name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)GeolocationgetCenter()The mode of the distribution, specified as a latitude-longitude pairBigDecimalgetDistance()A number representing the distance unit.BigDecimalgetFrom()Inclusive lower bound of the range.StringgetName()The field from your schema upon which to apply your filterGeolocationRangegetRange()Get the range for this filterBigDecimalgetTo()Exclusive upper bound of the range.Geolocation.UnitgetUnit()The base unit of measurementinthashCode()GeolocationFiltersetCenter(Geolocation center)The mode of the distribution, specified as a latitude-longitude pairGeolocationFiltersetDistance(BigDecimal distance)A number representing the distance unit.GeolocationFiltersetFrom(BigDecimal from)Inclusive lower bound of the range.GeolocationFiltersetName(String name)The field from your schema upon which to apply your filterGeolocationFiltersetRange(GeolocationRange range)Set the rangeGeolocationFiltersetTo(BigDecimal to)Exclusive upper bound of the range.GeolocationFiltersetUnit(Geolocation.Unit unit)The base unit of measurementStringtoString()
-
-
-
Constructor Detail
-
GeolocationFilter
public GeolocationFilter(String name)
Create a GeolocationFilter with the given name- Parameters:
name- the filter name
-
-
Method Detail
-
setRange
public GeolocationFilter setRange(GeolocationRange range)
Set the range- Parameters:
range- The range for this filter- Returns:
- This filter
-
getRange
public GeolocationRange getRange()
Get the range for this filter- Returns:
- The range
-
getName
public String getName()
The field from your schema upon which to apply your filter- Specified by:
getNamein interfaceFieldFilter- Returns:
- the field name
-
getCenter
public Geolocation getCenter()
The mode of the distribution, specified as a latitude-longitude pair- Returns:
- the center
-
getDistance
public BigDecimal getDistance()
A number representing the distance unit. Is required if from or to is not given.- Returns:
- the distance
-
getUnit
public Geolocation.Unit getUnit()
The base unit of measurement- Returns:
- the unit
-
getFrom
public BigDecimal getFrom()
Inclusive lower bound of the range. Is required if to is not given.- Returns:
- the lower bound
-
getTo
public BigDecimal getTo()
Exclusive upper bound of the range. Is required if from is not given.- Returns:
- the upper bound
-
setName
public GeolocationFilter setName(String name)
The field from your schema upon which to apply your filter- Parameters:
name- the field name- Returns:
this.
-
setCenter
public GeolocationFilter setCenter(Geolocation center)
The mode of the distribution, specified as a latitude-longitude pair- Parameters:
center- the center- Returns:
this.
-
setDistance
public GeolocationFilter setDistance(BigDecimal distance)
A number representing the distance unit. Is required if from or to is not given.- Parameters:
distance- the distance- Returns:
this.
-
setUnit
public GeolocationFilter setUnit(Geolocation.Unit unit)
The base unit of measurement- Parameters:
unit- the unit- Returns:
this.
-
setFrom
public GeolocationFilter setFrom(BigDecimal from)
Inclusive lower bound of the range. Is required if to is not given.- Parameters:
from- the lower bound- Returns:
this.
-
setTo
public GeolocationFilter setTo(BigDecimal to)
Exclusive upper bound of the range. Is required if from is not given.- Parameters:
to- the upper bound- Returns:
this.
-
-