Package org.elasticsearch.index.mapper
Class ParametrizedFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldMapper
org.elasticsearch.index.mapper.ParametrizedFieldMapper
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<Mapper>,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
- Direct Known Subclasses:
BinaryFieldMapper,BooleanFieldMapper
public abstract class ParametrizedFieldMapper extends FieldMapper
Defines how a particular field should be indexed and searched
Configuration
ParametrizedFieldMapper.Parameters for the mapper are defined on a ParametrizedFieldMapper.Builder subclass,
and returned by its ParametrizedFieldMapper.Builder.getParameters() method. Merging, serialization
and parsing of the mapper are all mediated through this set of parameters.
Subclasses should implement a ParametrizedFieldMapper.Builder that is returned from the
getMergeBuilder() method, initialised with the existing builder.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParametrizedFieldMapper.BuilderA Builder for a ParametrizedFieldMapperstatic classParametrizedFieldMapper.Parameter<T>A configurable parameter for a field mapperNested classes/interfaces inherited from class org.elasticsearch.index.mapper.FieldMapper
FieldMapper.CopyTo, FieldMapper.MultiFieldsNested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContext, Mapper.TypeParser -
Field Summary
Fields inherited from class org.elasticsearch.index.mapper.FieldMapper
COERCE_SETTING, copyTo, fieldType, IGNORE_MALFORMED_SETTING, mappedFieldType, multiFields -
Constructor Summary
Constructors Modifier Constructor Description protectedParametrizedFieldMapper(java.lang.String simpleName, MappedFieldType mappedFieldType, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)Creates a new ParametrizedFieldMapper -
Method Summary
Modifier and Type Method Description abstract ParametrizedFieldMapper.BuildergetMergeBuilder()Returns aParametrizedFieldMapper.Builderto be used for merging and serialization Implement as follows:return new MyBuilder(simpleName()).init(this);ParametrizedFieldMappermerge(Mapper mergeWith)Return the merge ofmergeWithinto this.protected voidmergeOptions(FieldMapper other, java.util.List<java.lang.String> conflicts)Merge type-specific options and check for incompatible settings in mappings to be mergedorg.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Methods inherited from class org.elasticsearch.index.mapper.FieldMapper
clone, contentType, copyTo, createFieldNamesField, docValuesByDefault, doXContentAnalyzers, doXContentBody, fieldType, indexedByDefault, indexOptionToString, iterator, name, parse, parseCreateField, parsesArrayValue, storedByDefault, termVectorOptionsToString, typeName
-
Constructor Details
-
ParametrizedFieldMapper
protected ParametrizedFieldMapper(java.lang.String simpleName, MappedFieldType mappedFieldType, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)Creates a new ParametrizedFieldMapper
-
-
Method Details
-
getMergeBuilder
Returns aParametrizedFieldMapper.Builderto be used for merging and serialization Implement as follows:return new MyBuilder(simpleName()).init(this); -
merge
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.- Overrides:
mergein classFieldMapper
-
mergeOptions
Description copied from class:FieldMapperMerge type-specific options and check for incompatible settings in mappings to be merged- Specified by:
mergeOptionsin classFieldMapper
-
toXContent
public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Overrides:
toXContentin classFieldMapper- Throws:
java.io.IOException
-