org.elasticsearch.index.mapper.internal
Class TTLFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.core.AbstractFieldMapper<T>
org.elasticsearch.index.mapper.core.NumberFieldMapper<Long>
org.elasticsearch.index.mapper.core.LongFieldMapper
org.elasticsearch.index.mapper.internal.TTLFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<Long>, AllFieldMapper.IncludeInAll, InternalMapper, Mapper, RootMapper
public class TTLFieldMapper
- extends LongFieldMapper
- implements InternalMapper, RootMapper
Constructor Summary |
|
TTLFieldMapper()
|
protected |
TTLFieldMapper(org.apache.lucene.document.Field.Store store,
org.apache.lucene.document.Field.Index index,
boolean enabled,
long defaultTTL,
boolean ignoreMalformed)
|
Methods inherited from class org.elasticsearch.index.mapper.core.LongFieldMapper |
contentType, customBoost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, indexedValue, maxPrecisionStep, nullValueFilter, rangeFilter, rangeFilter, rangeQuery, value, valueFromString |
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper |
analyzed, boost, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, name, names, omitNorms, prefixFilter, prefixQuery, queryStringTermQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, traverse, traverse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
TTLFieldMapper
public TTLFieldMapper()
TTLFieldMapper
protected TTLFieldMapper(org.apache.lucene.document.Field.Store store,
org.apache.lucene.document.Field.Index index,
boolean enabled,
long defaultTTL,
boolean ignoreMalformed)
enabled
public boolean enabled()
defaultTTL
public long defaultTTL()
valueForSearch
public Object valueForSearch(org.apache.lucene.document.Fieldable field)
- Description copied from class:
NumberFieldMapper
- Override the default behavior (to return the string, and return the actual Number instance).
- Specified by:
valueForSearch
in interface FieldMapper<Long>
- Overrides:
valueForSearch
in class NumberFieldMapper<Long>
valueForSearch
public Object valueForSearch(long expirationTime)
validate
public void validate(ParseContext context)
throws MapperParsingException
- Specified by:
validate
in interface RootMapper
- Throws:
MapperParsingException
preParse
public void preParse(ParseContext context)
throws IOException
- Specified by:
preParse
in interface RootMapper
- Throws:
IOException
postParse
public void postParse(ParseContext context)
throws IOException
- Specified by:
postParse
in interface RootMapper
- Throws:
IOException
parse
public void parse(ParseContext context)
throws IOException,
MapperParsingException
- Specified by:
parse
in interface Mapper
- Overrides:
parse
in class AbstractFieldMapper<Long>
- Throws:
IOException
MapperParsingException
includeInObject
public boolean includeInObject()
- Description copied from interface:
RootMapper
- Should the mapper be included in the root
ObjectMapper
.
- Specified by:
includeInObject
in interface RootMapper
innerParseCreateField
protected org.apache.lucene.document.Fieldable innerParseCreateField(ParseContext context)
throws IOException,
AlreadyExpiredException
- Overrides:
innerParseCreateField
in class LongFieldMapper
- Throws:
IOException
AlreadyExpiredException
toXContent
public XContentBuilder toXContent(XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Specified by:
toXContent
in interface ToXContent
- Overrides:
toXContent
in class AbstractFieldMapper<Long>
- Throws:
IOException
merge
public void merge(Mapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface Mapper
- Overrides:
merge
in class LongFieldMapper
- Throws:
MergeMappingException
Copyright © 2009-2012. All Rights Reserved.