public static class GeolocationContextMapping.Builder extends ContextBuilder<GeolocationContextMapping >
name| Modifier | Constructor and Description |
|---|---|
protected |
Builder(String
|
protected |
Builder(String
|
| Modifier and Type | Method and Description |
|---|---|
GeolocationContextMapping |
addDefaultLocation(double lat, double lon)
Set a default location that should be used, if no location is provided by the query
|
GeolocationContextMapping |
addDefaultLocation(String
Set a default location that should be used, if no location is provided by the query
|
GeolocationContextMapping |
addDefaultLocations(Collection
Set a default location that should be used, if no location is provided by the query
|
GeolocationContextMapping |
build()
|
GeolocationContextMapping |
defaultLocation(GeoPoint
Set a default location that should be used, if no location is provided by the query
|
GeolocationContextMapping |
field(String
Set the name of the field containing a geolocation to use
|
GeolocationContextMapping |
neighbors(boolean neighbors)
Set neighborhood usage
|
GeolocationContextMapping |
precision(double meters)
Set the precision use o make suggestions
|
GeolocationContextMapping |
precision(double precision, DistanceUnit
Set the precision use o make suggestions
|
GeolocationContextMapping |
precision(int level)
Set the precision use o make suggestions
|
GeolocationContextMapping |
precision(String
Set the precision use o make suggestions
|
category, category, loadMapping, loadMappings, location, location, reference, referenceprotected Builder(Stringname)
protected Builder(Stringname, boolean neighbors, int... levels)
public GeolocationContextMapping.Builder precision(String precision)
precision - precision as distance with
DistanceUnit. Default: meters
public GeolocationContextMapping.Builder precision(double precision, DistanceUnit unit)
precision - precision value
unit -
DistanceUnit to use
public GeolocationContextMapping.Builder precision(double meters)
meters - precision as distance in meters
public GeolocationContextMapping.Builder precision(int level)
level - maximum length of geohashes
public GeolocationContextMapping.Builder neighbors(boolean neighbors)
neighbors - should neighbor cells also be valid
public GeolocationContextMapping.Builder addDefaultLocation(String geohash)
geohash - geohash of the default location
public GeolocationContextMapping.Builder addDefaultLocations(Collection <String > geohashes)
geohashes - geohash of the default location
public GeolocationContextMapping.Builder addDefaultLocation(double lat, double lon)
lat - latitude of the default location
lon - longitude of the default location
public GeolocationContextMapping.Builder defaultLocation(GeoPoint point)
point - location
public GeolocationContextMapping.Builder field(String fieldName)
fieldName - name of the field
public GeolocationContextMappingbuild()