public static class GeoContextMapping.Builder extends ContextBuilder<GeoContextMapping>
name
Constructor and Description |
---|
Builder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
GeoContextMapping |
build() |
GeoContextMapping.Builder |
field(java.lang.String fieldName)
Set the name of the field containing a geolocation to use
|
GeoContextMapping.Builder |
precision(double meters)
Set the precision use o make suggestions
|
GeoContextMapping.Builder |
precision(double precision,
DistanceUnit unit)
Set the precision use o make suggestions
|
GeoContextMapping.Builder |
precision(int level)
Set the precision use o make suggestions
|
GeoContextMapping.Builder |
precision(java.lang.String precision)
Set the precision use o make suggestions
|
category, geo
public GeoContextMapping.Builder precision(java.lang.String precision)
precision
- precision as distance with DistanceUnit
. Default:
meterspublic GeoContextMapping.Builder precision(double precision, DistanceUnit unit)
precision
- precision valueunit
- DistanceUnit
to usepublic GeoContextMapping.Builder precision(double meters)
meters
- precision as distance in meterspublic GeoContextMapping.Builder precision(int level)
level
- maximum length of geohashespublic GeoContextMapping.Builder field(java.lang.String fieldName)
fieldName
- name of the fieldpublic GeoContextMapping build()
build
in class ContextBuilder<GeoContextMapping>