public class TTLFieldMapper extends LongFieldMapper implements InternalMapper, RootMapper
Modifier and Type | Class and Description |
---|---|
static class |
TTLFieldMapper.Builder |
static class |
TTLFieldMapper.Defaults |
static class |
TTLFieldMapper.TypeParser |
LongFieldMapper.CustomLongNumericField
NumberFieldMapper.CustomLongNumericDocValuesField, NumberFieldMapper.CustomNumericDocValuesField, NumberFieldMapper.CustomNumericField
AbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFields
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
FieldMapper.Loading, FieldMapper.Names
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
static String |
NAME |
coerce, ignoreMalformed, includeInAll, precisionStep, useSortedNumericDocValues
boost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarity
EMPTY_ARRAY
EMPTY_PARAMS
DOC_VALUES_FORMAT
Modifier | Constructor and Description |
---|---|
protected |
TTLFieldMapper(org.apache.lucene.document.FieldType fieldType,
EnabledAttributeMapper enabled,
long defaultTTL,
Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce,
PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider,
Settings fieldDataSettings,
Settings indexSettings) |
|
TTLFieldMapper(Settings indexSettings) |
Modifier and Type | Method and Description |
---|---|
long |
defaultTTL() |
boolean |
enabled() |
boolean |
hasDocValues() |
boolean |
includeInObject()
Should the mapper be included in the root
ObjectMapper . |
protected void |
innerParseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields) |
void |
merge(Mapper mergeWith,
MergeContext mergeContext) |
void |
parse(ParseContext context) |
void |
postParse(ParseContext context)
Called after
Mapper.parse(ParseContext) on the RootObjectMapper . |
void |
preParse(ParseContext context)
Called before
Mapper.parse(ParseContext) on the RootObjectMapper . |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Object |
valueForSearch(long expirationTime) |
Object |
valueForSearch(Object value)
Override the default behavior (to return the string, and return the actual Number instance).
|
contentType, customBoost, defaultFieldDataType, defaultFieldType, doXContentBody, fuzzyQuery, indexedValueForSearch, maxPrecisionStep, nullValueFilter, rangeFilter, rangeFilter, rangeQuery, termFilter, termQuery, value
addDocValue, close, fieldDataTermsFilter, includeInAll, includeInAllIfNotSet, isNumeric, parseCreateField, parseDoubleValue, parseLongValue, popCachedStream, precisionStep, unsetIncludeInAll, useTermQueryWithQueryString
boost, copyTo, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, fieldDataType, fieldType, indexAnalyzer, indexOptionToString, indexTokenizeOptionToString, isGenerated, isSortable, name, names, normsLoading, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termsFilter, termVectorOptionsToString, traverse, traverse
public static final String NAME
public static final String CONTENT_TYPE
public TTLFieldMapper(Settings indexSettings)
protected TTLFieldMapper(org.apache.lucene.document.FieldType fieldType, EnabledAttributeMapper enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings)
public boolean enabled()
public long defaultTTL()
public boolean hasDocValues()
hasDocValues
in interface FieldMapper<Long>
hasDocValues
in class AbstractFieldMapper<Long>
public Object valueForSearch(Object value)
NumberFieldMapper
valueForSearch
in interface FieldMapper<Long>
valueForSearch
in class NumberFieldMapper<Long>
public Object valueForSearch(long expirationTime)
public void preParse(ParseContext context) throws IOException
RootMapper
Mapper.parse(ParseContext)
on the RootObjectMapper
.preParse
in interface RootMapper
IOException
public void postParse(ParseContext context) throws IOException
RootMapper
Mapper.parse(ParseContext)
on the RootObjectMapper
.postParse
in interface RootMapper
IOException
public void parse(ParseContext context) throws IOException, MapperParsingException
parse
in interface Mapper
parse
in class AbstractFieldMapper<Long>
IOException
MapperParsingException
public boolean includeInObject()
RootMapper
ObjectMapper
.
If this method returns true, then Mapper.parse(ParseContext)
will be
called if the context has a property that matches the name of this
RootMapper
. Otherwise Mapper.parse(ParseContext)
will not
be called.includeInObject
in interface RootMapper
protected void innerParseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException, AlreadyExpiredException
innerParseCreateField
in class LongFieldMapper
IOException
AlreadyExpiredException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
toXContent
in class AbstractFieldMapper<Long>
IOException
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class LongFieldMapper
MergeMappingException
Copyright © 2009–2015. All rights reserved.