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.MultiFields
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFields
EMPTY_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, updateFieldType
simpleName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public 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 FieldMapper
public StringFieldMapper includeInAll(Boolean includeInAll)
AllFieldMapper.IncludeInAll
includeInAll
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.IncludeInAll
public StringFieldMapper includeInAllIfNotSet(Boolean includeInAll)
AllFieldMapper.IncludeInAll
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
.includeInAllIfNotSet
in interface AllFieldMapper.IncludeInAll
public StringFieldMapper unsetIncludeInAll()
AllFieldMapper.IncludeInAll
includeInAll
was already set on this mapper then return a copy
of this mapper that has includeInAll
not set.unsetIncludeInAll
in interface AllFieldMapper.IncludeInAll
protected boolean customBoost()
FieldMapper
customBoost
in class FieldMapper
public int getPositionIncrementGap()
public int getIgnoreAbove()
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
FieldMapper
fields
.parseCreateField
in class FieldMapper
IOException
public 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 FieldMapper
protected void doMerge(Mapper mergeWith, boolean updateAllTypes)
FieldMapper
mergeWith
in place.doMerge
in class FieldMapper
updateAllTypes
- TODOprotected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody
in class FieldMapper
IOException
Copyright © 2009–2016. All rights reserved.