org.elasticsearch.index.mapper.xcontent
Class XContentDoubleFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.xcontent.XContentFieldMapper<T>
      extended by org.elasticsearch.index.mapper.xcontent.XContentNumberFieldMapper<java.lang.Double>
          extended by org.elasticsearch.index.mapper.xcontent.XContentDoubleFieldMapper
All Implemented Interfaces:
FieldMapper<java.lang.Double>, XContentIncludeInAllMapper, XContentMapper, ToXContent

public class XContentDoubleFieldMapper
extends XContentNumberFieldMapper<java.lang.Double>


Nested Class Summary
static class XContentDoubleFieldMapper.Builder
           
static class XContentDoubleFieldMapper.Defaults
           
static class XContentDoubleFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.XContentNumberFieldMapper
XContentNumberFieldMapper.CachedNumericTokenStream
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
XContentFieldMapper.OpenBuilder<T extends XContentFieldMapper.Builder,Y extends XContentFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
XContentMapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.util.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.XContentNumberFieldMapper
includeInAll, precisionStep
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
boost, index, indexAnalyzer, names, omitNorms, omitTermFreqAndPositions, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.util.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected XContentDoubleFieldMapper(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.Double nullValue)
           
 
Method Summary
protected  java.lang.String contentType()
           
protected  void doXContentBody(XContentBuilder builder)
           
 java.lang.String indexedValue(java.lang.Double value)
          Returns the indexed value.
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
protected  int maxPrecisionStep()
           
protected  org.apache.lucene.document.Field parseCreateField(ParseContext context)
           
 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.
 int sortType()
           
 java.lang.Double value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 java.lang.Object valueFromString(java.lang.String text)
          Parses a string that represents the field into its value.
 java.lang.Object valueFromTerm(java.lang.String term)
          Simply returns the same string.
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.XContentNumberFieldMapper
fieldFilter, fieldQuery, includeInAll, popCachedStream, precisionStep, shouldBreakTermEnumeration, useFieldQueryWithQueryString, valueAsString, valueForSearch
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
analyzed, boost, index, indexAnalyzer, indexed, merge, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, searchAnalyzer, store, stored, termVector, toXContent, traverse, valueForSearch
 
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
merge, name, parse, traverse
 
Methods inherited from interface org.elasticsearch.util.xcontent.ToXContent
toXContent
 

Field Detail

CONTENT_TYPE

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

XContentDoubleFieldMapper

protected XContentDoubleFieldMapper(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.Double nullValue)
Method Detail

maxPrecisionStep

protected int maxPrecisionStep()
Specified by:
maxPrecisionStep in class XContentNumberFieldMapper<java.lang.Double>

value

public java.lang.Double value(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field.


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.Double>
Overrides:
indexedValue in class XContentFieldMapper<java.lang.Double>

indexedValue

public java.lang.String indexedValue(java.lang.Double value)
Description copied from interface: FieldMapper
Returns the indexed value.

Specified by:
indexedValue in interface FieldMapper<java.lang.Double>
Overrides:
indexedValue in class XContentFieldMapper<java.lang.Double>

valueFromTerm

public java.lang.Object valueFromTerm(java.lang.String term)
Description copied from class: XContentFieldMapper
Simply returns the same string.

Specified by:
valueFromTerm in interface FieldMapper<java.lang.Double>
Specified by:
valueFromTerm in class XContentNumberFieldMapper<java.lang.Double>

valueFromString

public java.lang.Object valueFromString(java.lang.String text)
Description copied from interface: FieldMapper
Parses a string that represents the field into its value. For example, with numbers, it parses "1" to 1.

Specified by:
valueFromString in interface FieldMapper<java.lang.Double>
Specified by:
valueFromString in class XContentNumberFieldMapper<java.lang.Double>

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.Double>
Specified by:
rangeQuery in class XContentNumberFieldMapper<java.lang.Double>

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.Double>
Specified by:
rangeFilter in class XContentNumberFieldMapper<java.lang.Double>

parseCreateField

protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
                                                     throws java.io.IOException
Specified by:
parseCreateField in class XContentFieldMapper<java.lang.Double>
Throws:
java.io.IOException

sortType

public int sortType()
Specified by:
sortType in interface FieldMapper<java.lang.Double>
Specified by:
sortType in class XContentNumberFieldMapper<java.lang.Double>

contentType

protected java.lang.String contentType()
Specified by:
contentType in class XContentFieldMapper<java.lang.Double>

doXContentBody

protected void doXContentBody(XContentBuilder builder)
                       throws java.io.IOException
Overrides:
doXContentBody in class XContentNumberFieldMapper<java.lang.Double>
Throws:
java.io.IOException