public class StringFieldMapper extends FieldMapper implements AllFieldMapper.IncludeInAll
| Modifier and Type | Class and Description |
|---|---|
static class |
StringFieldMapper.Builder |
static class |
StringFieldMapper.Defaults |
static class |
StringFieldMapper.StringFieldType |
static class |
StringFieldMapper.TypeParser |
static class |
StringFieldMapper.ValueAndBoost
Parsed value and boost to be returned from
parseCreateFieldForString(org.elasticsearch.index.mapper.ParseContext, java.lang.String, float). |
FieldMapper.CopyTo, FieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE |
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFieldsEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
StringFieldMapper(String simpleName,
MappedFieldType fieldType,
MappedFieldType defaultFieldType,
int positionIncrementGap,
int ignoreAbove,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo) |
| Modifier and Type | Method and Description |
|---|---|
protected StringFieldMapper |
clone() |
protected String |
contentType() |
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 |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
int |
getIgnoreAbove() |
int |
getPositionIncrementGap() |
StringFieldMapper |
includeInAll(Boolean includeInAll)
If
includeInAll is not null then return a copy of this mapper
that will include values in the _all field according to includeInAll. |
StringFieldMapper |
includeInAllIfNotSet(Boolean includeInAll)
If
includeInAll is not null and not set on this mapper yet, then
return a copy of this mapper that will include values in the _all field
according to includeInAll. |
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields. |
static StringFieldMapper.ValueAndBoost |
parseCreateFieldForString(ParseContext context,
String nullValue,
float defaultBoost)
Parse a field as though it were a string.
|
StringFieldMapper |
unsetIncludeInAll()
If
includeInAll was already set on this mapper then return a copy
of this mapper that has includeInAll not set. |
copyTo, doXContentAnalyzers, doXContentDocValues, fieldType, hasCustomFieldDataSettings, indexOptionToString, indexTokenizeOptionToString, isGenerated, iterator, merge, name, parse, termVectorOptionsToString, toXContent, updateFieldTypesimpleNamepublic static final String CONTENT_TYPE
protected StringFieldMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, int positionIncrementGap, int ignoreAbove, Settings indexSettings, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)
protected StringFieldMapper clone()
clone in class FieldMapperpublic StringFieldMapper includeInAll(Boolean includeInAll)
AllFieldMapper.IncludeInAllincludeInAll is not null then return a copy of this mapper
that will include values in the _all field according to includeInAll.includeInAll in interface AllFieldMapper.IncludeInAllpublic StringFieldMapper includeInAllIfNotSet(Boolean includeInAll)
AllFieldMapper.IncludeInAllincludeInAll is not null and not set on this mapper yet, then
return a copy of this mapper that will include values in the _all field
according to includeInAll.includeInAllIfNotSet in interface AllFieldMapper.IncludeInAllpublic StringFieldMapper unsetIncludeInAll()
AllFieldMapper.IncludeInAllincludeInAll was already set on this mapper then return a copy
of this mapper that has includeInAll not set.unsetIncludeInAll in interface AllFieldMapper.IncludeInAllprotected boolean customBoost()
FieldMappercustomBoost in class FieldMapperpublic int getPositionIncrementGap()
public int getIgnoreAbove()
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
FieldMapperfields.parseCreateField in class FieldMapperIOExceptionpublic static StringFieldMapper.ValueAndBoost parseCreateFieldForString(ParseContext context, String nullValue, float defaultBoost) throws IOException
context - parse context used during parsingnullValue - value to use for nulldefaultBoost - default boost value returned unless overwritten in the fieldIOException - if thrown while parsingprotected String contentType()
contentType in class FieldMapperprotected void doMerge(Mapper mergeWith, boolean updateAllTypes)
FieldMappermergeWith in place.doMerge in class FieldMapperupdateAllTypes - TODOprotected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody in class FieldMapperIOExceptionCopyright © 2009–2017. All rights reserved.