public abstract class NumberFieldMapper extends FieldMapper implements AllFieldMapper.IncludeInAll
Modifier and Type | Class and Description |
---|---|
static class |
NumberFieldMapper.Builder<T extends NumberFieldMapper.Builder,Y extends NumberFieldMapper> |
static class |
NumberFieldMapper.CustomLongNumericDocValuesField |
static class |
NumberFieldMapper.CustomNumericDocValuesField |
static class |
NumberFieldMapper.CustomNumericField |
static class |
NumberFieldMapper.Defaults |
static class |
NumberFieldMapper.NumberFieldType |
FieldMapper.CopyTo, FieldMapper.MultiFields
Mapper.BuilderContext, Mapper.TypeParser
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected Explicit<Boolean> |
coerce |
protected Explicit<Boolean> |
ignoreMalformed |
protected Boolean |
includeInAll |
protected boolean |
useSortedNumericDocValues
True if index version is 1.4+
|
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFields
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
NumberFieldMapper(String simpleName,
MappedFieldType fieldType,
MappedFieldType defaultFieldType,
Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDocValue(ParseContext context,
List<org.apache.lucene.document.Field> fields,
long value) |
protected NumberFieldMapper |
clone() |
protected void |
doMerge(Mapper mergeWith,
boolean updateAllTypes)
Merge changes coming from
mergeWith in place. |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
Mapper |
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 . |
Mapper |
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 abstract void |
innerParseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields) |
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields . |
static double |
parseDoubleValue(Object value)
Converts an object value into a double
|
static long |
parseLongValue(Object value)
Converts an object value into a long
|
Mapper |
unsetIncludeInAll()
If
includeInAll was already set on this mapper then return a copy
of this mapper that has includeInAll not set. |
contentType, copyTo, customBoost, doXContentAnalyzers, doXContentDocValues, fieldType, hasCustomFieldDataSettings, indexOptionToString, indexTokenizeOptionToString, isGenerated, iterator, merge, name, parse, termVectorOptionsToString, toXContent, updateFieldType
simpleName
protected Boolean includeInAll
protected final boolean useSortedNumericDocValues
In this case numerics are encoded with SORTED_NUMERIC docvalues, otherwise for older indexes we must continue to write BINARY (for now)
protected NumberFieldMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce, Settings indexSettings, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)
protected NumberFieldMapper clone()
clone
in class FieldMapper
public Mapper 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 Mapper 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 Mapper 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 void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
FieldMapper
fields
.parseCreateField
in class FieldMapper
IOException
protected abstract void innerParseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
IOException
protected final void addDocValue(ParseContext context, List<org.apache.lucene.document.Field> fields, long value)
public static double parseDoubleValue(Object value)
public static long parseLongValue(Object value)
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.