public abstract class ContextBuilder<E extends ContextMapping> extends Object
| コンストラクタと説明 |
|---|
ContextBuilder(String name) |
protected String name
public ContextBuilder(String name)
public abstract E build()
public static GeolocationContextMapping.Builder location(String name)
GeolocationContextMappingpublic static GeolocationContextMapping.Builder location(String name, int precision, boolean neighbors)
GeolocationContextMapping with given precision and
neighborhood usageprecision - geohash lengthneighbors - use neighbor cellspublic static CategoryContextMapping.Builder category(String name)
CategoryMappingpublic static CategoryContextMapping.Builder category(String name, String defaultCategory)
CategoryMapping with default categorydefaultCategory - category to use, if it is not providedpublic static CategoryContextMapping.Builder reference(String name, String fieldname)
CategoryContextMappingfieldname - name of the field to usepublic static CategoryContextMapping.Builder reference(String name, String fieldname, Iterable<? extends CharSequence> defaultValues)
CategoryContextMappingfieldname - name of the field to usedefaultValues - values to use, if the document not provides
a field with the given namepublic static SortedMap<String,ContextMapping> loadMappings(Object configuration, Version indexVersionCreated) throws ElasticsearchParseException
protected static ContextMapping loadMapping(String name, Map<String,Object> config, Version indexVersionCreated) throws ElasticsearchParseException
Copyright © 2009–2016. All rights reserved.