Class GeoContextMapping.Builder
- java.lang.Object
-
- org.elasticsearch.search.suggest.completion.context.ContextBuilder<GeoContextMapping>
-
- org.elasticsearch.search.suggest.completion.context.GeoContextMapping.Builder
-
- Enclosing class:
- GeoContextMapping
public static class GeoContextMapping.Builder extends ContextBuilder<GeoContextMapping>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.suggest.completion.context.ContextBuilder
name
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String name)
-
Method Summary
Modifier and Type Method Description GeoContextMappingbuild()GeoContextMapping.Builderfield(java.lang.String fieldName)Set the name of the field containing a geolocation to useGeoContextMapping.Builderprecision(double meters)Set the precision use o make suggestionsGeoContextMapping.Builderprecision(double precision, DistanceUnit unit)Set the precision use o make suggestionsGeoContextMapping.Builderprecision(int level)Set the precision use o make suggestionsGeoContextMapping.Builderprecision(java.lang.String precision)Set the precision use o make suggestions-
Methods inherited from class org.elasticsearch.search.suggest.completion.context.ContextBuilder
category, geo
-
-
-
-
Method Detail
-
precision
public GeoContextMapping.Builder precision(java.lang.String precision)
Set the precision use o make suggestions- Parameters:
precision- precision as distance withDistanceUnit. Default: meters- Returns:
- this
-
precision
public GeoContextMapping.Builder precision(double precision, DistanceUnit unit)
Set the precision use o make suggestions- Parameters:
precision- precision valueunit-DistanceUnitto use- Returns:
- this
-
precision
public GeoContextMapping.Builder precision(double meters)
Set the precision use o make suggestions- Parameters:
meters- precision as distance in meters- Returns:
- this
-
precision
public GeoContextMapping.Builder precision(int level)
Set the precision use o make suggestions- Parameters:
level- maximum length of geohashes- Returns:
- this
-
field
public GeoContextMapping.Builder field(java.lang.String fieldName)
Set the name of the field containing a geolocation to use- Parameters:
fieldName- name of the field- Returns:
- this
-
build
public GeoContextMapping build()
- Specified by:
buildin classContextBuilder<GeoContextMapping>
-
-