org.elasticsearch.index.mapper.xcontent
Class IntegerFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper<T>
      extended by org.elasticsearch.index.mapper.xcontent.NumberFieldMapper<java.lang.Integer>
          extended by org.elasticsearch.index.mapper.xcontent.IntegerFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<java.lang.Integer>, IncludeInAllMapper, XContentMapper
Direct Known Subclasses:
SizeFieldMapper

public class IntegerFieldMapper
extends NumberFieldMapper<java.lang.Integer>


Nested Class Summary
static class IntegerFieldMapper.Builder
           
static class IntegerFieldMapper.CustomIntegerNumericField
           
static class IntegerFieldMapper.Defaults
           
static class IntegerFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.NumberFieldMapper
NumberFieldMapper.CustomNumericField
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
AbstractFieldMapper.OpenBuilder<T extends AbstractFieldMapper.Builder,Y extends AbstractFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
XContentMapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Names
 
Field Summary
static java.lang.String CONTENT_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.NumberFieldMapper
dFuzzyFactor, fuzzyFactor, includeInAll, precisionStep
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
boost, index, indexAnalyzer, names, omitNorms, omitTermFreqAndPositions, searchAnalyzer, store, termFactory, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected IntegerFieldMapper(FieldMapper.Names names, int precisionStep, java.lang.String fuzzyFactor, org.apache.lucene.document.Field.Index index, org.apache.lucene.document.Field.Store store, float boost, boolean omitNorms, boolean omitTermFreqAndPositions, java.lang.Integer nullValue)
           
 
Method Summary
protected  java.lang.String contentType()
           
protected  void doXContentBody(XContentBuilder builder)
           
 FieldDataType fieldDataType()
           
 org.apache.lucene.search.Query fuzzyQuery(java.lang.String value, double minSim, int prefixLength, int maxExpansions)
           
 org.apache.lucene.search.Query fuzzyQuery(java.lang.String value, java.lang.String minSim, int prefixLength, int maxExpansions)
           
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
protected  int maxPrecisionStep()
           
 void merge(XContentMapper mergeWith, MergeContext mergeContext)
           
protected  org.apache.lucene.document.Fieldable parseCreateField(ParseContext context)
           
 org.apache.lucene.search.Filter rangeFilter(FieldDataCache fieldDataCache, java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)
          A range filter based on the field data cache.
 org.apache.lucene.search.Filter rangeFilter(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)
          Constructs a range query filter based on the mapper.
 org.apache.lucene.search.Query rangeQuery(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)
          Constructs a range query based on the mapper.
 java.lang.Integer value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 java.lang.Integer valueFromString(java.lang.String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.NumberFieldMapper
close, fieldFilter, fieldQuery, includeInAll, includeInAllIfNotSet, parseFuzzyFactor, popCachedStream, precisionStep, useFieldQueryWithQueryString, valueAsString, valueForSearch
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
analyzed, boost, customBoost, 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
 
Methods inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
name, parse, traverse
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

IntegerFieldMapper

protected IntegerFieldMapper(FieldMapper.Names names,
                             int precisionStep,
                             java.lang.String fuzzyFactor,
                             org.apache.lucene.document.Field.Index index,
                             org.apache.lucene.document.Field.Store store,
                             float boost,
                             boolean omitNorms,
                             boolean omitTermFreqAndPositions,
                             java.lang.Integer nullValue)
Method Detail

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>

fuzzyQuery

public org.apache.lucene.search.Query fuzzyQuery(java.lang.String value,
                                                 java.lang.String minSim,
                                                 int prefixLength,
                                                 int maxExpansions)
Specified by:
fuzzyQuery in interface FieldMapper<java.lang.Integer>
Specified by:
fuzzyQuery in class NumberFieldMapper<java.lang.Integer>

fuzzyQuery

public org.apache.lucene.search.Query fuzzyQuery(java.lang.String value,
                                                 double minSim,
                                                 int prefixLength,
                                                 int maxExpansions)
Specified by:
fuzzyQuery in interface FieldMapper<java.lang.Integer>
Specified by:
fuzzyQuery in class NumberFieldMapper<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>

rangeFilter

public org.apache.lucene.search.Filter rangeFilter(FieldDataCache fieldDataCache,
                                                   java.lang.String lowerTerm,
                                                   java.lang.String upperTerm,
                                                   boolean includeLower,
                                                   boolean includeUpper)
Description copied from class: NumberFieldMapper
A range filter based on the field data cache.

Specified by:
rangeFilter in class NumberFieldMapper<java.lang.Integer>

parseCreateField

protected org.apache.lucene.document.Fieldable 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 AbstractFieldMapper<java.lang.Integer>
Throws:
java.io.IOException