public abstract class FieldMapper extends Mapper implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
FieldMapper.Builder<T extends FieldMapper.Builder,Y extends FieldMapper> |
static class |
FieldMapper.CopyTo
Represents a list of fields with optional boost factor where the current field should be copied to
|
static class |
FieldMapper.MultiFields |
Mapper.BuilderContext, Mapper.TypeParser
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.Boolean> |
COERCE_SETTING |
protected FieldMapper.CopyTo |
copyTo |
protected MappedFieldType |
defaultFieldType |
protected MappedFieldType |
fieldType |
static Setting<java.lang.Boolean> |
IGNORE_MALFORMED_SETTING |
protected Version |
indexCreatedVersion |
protected FieldMapper.MultiFields |
multiFields |
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
FieldMapper(java.lang.String simpleName,
MappedFieldType fieldType,
MappedFieldType defaultFieldType,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
protected FieldMapper |
clone() |
protected abstract java.lang.String |
contentType() |
FieldMapper.CopyTo |
copyTo()
List of fields where this field should be copied to
|
protected boolean |
customBoost()
Derived classes can override it to specify that boost value is set by derived classes.
|
protected void |
doMerge(Mapper mergeWith,
boolean updateAllTypes)
Merge changes coming from
mergeWith in place. |
protected void |
doXContentAnalyzers(XContentBuilder builder,
boolean includeDefaults) |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
protected void |
doXContentDocValues(XContentBuilder builder,
boolean includeDefaults) |
MappedFieldType |
fieldType() |
protected static java.lang.String |
indexOptionToString(org.apache.lucene.index.IndexOptions indexOption) |
protected java.lang.Object |
indexTokenizeOption(boolean indexed,
boolean tokenized) |
java.util.Iterator<Mapper> |
iterator() |
FieldMapper |
merge(Mapper mergeWith,
boolean updateAllTypes)
Return the merge of
mergeWith into this. |
java.lang.String |
name()
Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
|
Mapper |
parse(ParseContext context)
Parse using the provided
ParseContext and return a mapping
update if dynamic mappings modified the mappings, or null if
mappings were not modified. |
protected abstract void |
parseCreateField(ParseContext context,
java.util.List<org.apache.lucene.index.IndexableField> fields)
Parse the field value and populate
fields . |
static java.lang.String |
termVectorOptionsToString(org.apache.lucene.document.FieldType fieldType) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
FieldMapper |
updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)
Update the field type of this mapper.
|
simpleName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
public static final Setting<java.lang.Boolean> IGNORE_MALFORMED_SETTING
public static final Setting<java.lang.Boolean> COERCE_SETTING
protected final Version indexCreatedVersion
protected MappedFieldType fieldType
protected final MappedFieldType defaultFieldType
protected FieldMapper.MultiFields multiFields
protected FieldMapper.CopyTo copyTo
protected FieldMapper(java.lang.String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Settings indexSettings, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)
public java.lang.String name()
Mapper
public MappedFieldType fieldType()
public FieldMapper.CopyTo copyTo()
public Mapper parse(ParseContext context) throws java.io.IOException
ParseContext
and return a mapping
update if dynamic mappings modified the mappings, or null
if
mappings were not modified.java.io.IOException
protected abstract void parseCreateField(ParseContext context, java.util.List<org.apache.lucene.index.IndexableField> fields) throws java.io.IOException
fields
.java.io.IOException
protected boolean customBoost()
public java.util.Iterator<Mapper> iterator()
iterator
in interface java.lang.Iterable<Mapper>
protected FieldMapper clone()
clone
in class java.lang.Object
public FieldMapper merge(Mapper mergeWith, boolean updateAllTypes)
Mapper
mergeWith
into this.
Both this
and mergeWith
will be left unmodified.protected void doMerge(Mapper mergeWith, boolean updateAllTypes)
mergeWith
in place.updateAllTypes
- TODOpublic FieldMapper updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)
Mapper
updateFieldType
in class Mapper
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws java.io.IOException
java.io.IOException
protected final void doXContentAnalyzers(XContentBuilder builder, boolean includeDefaults) throws java.io.IOException
java.io.IOException
protected void doXContentDocValues(XContentBuilder builder, boolean includeDefaults) throws java.io.IOException
java.io.IOException
protected static java.lang.String indexOptionToString(org.apache.lucene.index.IndexOptions indexOption)
public static java.lang.String termVectorOptionsToString(org.apache.lucene.document.FieldType fieldType)
protected java.lang.Object indexTokenizeOption(boolean indexed, boolean tokenized)
protected abstract java.lang.String contentType()