org.elasticsearch.index.mapper.xcontent
Class IntegerFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper<T>
org.elasticsearch.index.mapper.xcontent.NumberFieldMapper<java.lang.Integer>
org.elasticsearch.index.mapper.xcontent.IntegerFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<java.lang.Integer>, IncludeInAllMapper, XContentMapper
public class IntegerFieldMapper
- extends NumberFieldMapper<java.lang.Integer>
Constructor Summary |
protected |
IntegerFieldMapper(FieldMapper.Names names,
int precisionStep,
org.apache.lucene.document.Field.Index index,
org.apache.lucene.document.Field.Store store,
float boost,
boolean omitNorms,
boolean omitTermFreqAndPositions,
java.lang.Integer nullValue)
|
Methods inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper |
analyzed, boost, index, indexAnalyzer, indexed, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, searchAnalyzer, store, stored, termVector, toXContent, traverse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
IntegerFieldMapper
protected IntegerFieldMapper(FieldMapper.Names names,
int precisionStep,
org.apache.lucene.document.Field.Index index,
org.apache.lucene.document.Field.Store store,
float boost,
boolean omitNorms,
boolean omitTermFreqAndPositions,
java.lang.Integer nullValue)
maxPrecisionStep
protected int maxPrecisionStep()
- Specified by:
maxPrecisionStep
in class NumberFieldMapper<java.lang.Integer>
value
public java.lang.Integer value(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field.
valueFromString
public java.lang.Integer valueFromString(java.lang.String value)
indexedValue
public java.lang.String indexedValue(java.lang.String value)
- Description copied from interface:
FieldMapper
- Returns the indexed value.
- Specified by:
indexedValue
in interface FieldMapper<java.lang.Integer>
- Overrides:
indexedValue
in class AbstractFieldMapper<java.lang.Integer>
rangeQuery
public org.apache.lucene.search.Query rangeQuery(java.lang.String lowerTerm,
java.lang.String upperTerm,
boolean includeLower,
boolean includeUpper)
- Description copied from interface:
FieldMapper
- Constructs a range query based on the mapper.
- Specified by:
rangeQuery
in interface FieldMapper<java.lang.Integer>
- Specified by:
rangeQuery
in class NumberFieldMapper<java.lang.Integer>
rangeFilter
public org.apache.lucene.search.Filter rangeFilter(java.lang.String lowerTerm,
java.lang.String upperTerm,
boolean includeLower,
boolean includeUpper)
- Description copied from interface:
FieldMapper
- Constructs a range query filter based on the mapper.
- Specified by:
rangeFilter
in interface FieldMapper<java.lang.Integer>
- Specified by:
rangeFilter
in class NumberFieldMapper<java.lang.Integer>
parseCreateField
protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
throws java.io.IOException
- Specified by:
parseCreateField
in class AbstractFieldMapper<java.lang.Integer>
- Throws:
java.io.IOException
fieldDataType
public FieldDataType fieldDataType()
- Specified by:
fieldDataType
in interface FieldMapper<java.lang.Integer>
- Specified by:
fieldDataType
in class NumberFieldMapper<java.lang.Integer>
contentType
protected java.lang.String contentType()
- Specified by:
contentType
in class AbstractFieldMapper<java.lang.Integer>
merge
public void merge(XContentMapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface XContentMapper
- Overrides:
merge
in class NumberFieldMapper<java.lang.Integer>
- Throws:
MergeMappingException
doXContentBody
protected void doXContentBody(XContentBuilder builder)
throws java.io.IOException
- Overrides:
doXContentBody
in class NumberFieldMapper<java.lang.Integer>
- Throws:
java.io.IOException