org.elasticsearch.index.mapper.internal
Class BoostFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.core.AbstractFieldMapper<T>
      extended by org.elasticsearch.index.mapper.core.NumberFieldMapper<Float>
          extended by org.elasticsearch.index.mapper.internal.BoostFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<Float>, AllFieldMapper.IncludeInAll, InternalMapper, Mapper, RootMapper

public class BoostFieldMapper
extends NumberFieldMapper<Float>
implements InternalMapper, RootMapper


Nested Class Summary
static class BoostFieldMapper.Builder
           
static class BoostFieldMapper.Defaults
           
static class BoostFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.core.NumberFieldMapper
NumberFieldMapper.CustomNumericField
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
AbstractFieldMapper.OpenBuilder<T extends AbstractFieldMapper.Builder,Y extends AbstractFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.Mapper
Mapper.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 String CONTENT_TYPE
           
static String NAME
           
 
Fields inherited from class org.elasticsearch.index.mapper.core.NumberFieldMapper
dFuzzyFactor, fuzzyFactor, ignoreMalformed, includeInAll, precisionStep
 
Fields inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
boost, index, indexAnalyzer, indexOptions, names, omitNorms, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.Mapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
  BoostFieldMapper()
           
protected BoostFieldMapper(String name, String indexName)
           
protected BoostFieldMapper(String name, String indexName, int precisionStep, org.apache.lucene.document.Field.Index index, org.apache.lucene.document.Field.Store store, float boost, boolean omitNorms, org.apache.lucene.index.FieldInfo.IndexOptions indexOptions, Float nullValue)
           
 
Method Summary
protected  String contentType()
           
 FieldDataType fieldDataType()
           
 org.apache.lucene.search.Query fuzzyQuery(String value, double minSim, int prefixLength, int maxExpansions)
           
 org.apache.lucene.search.Query fuzzyQuery(String value, String minSim, int prefixLength, int maxExpansions)
           
 boolean includeInObject()
          Should the mapper be included in the root ObjectMapper.
 String indexedValue(String value)
          Returns the indexed value.
protected  org.apache.lucene.document.Fieldable innerParseCreateField(ParseContext context)
           
protected  int maxPrecisionStep()
           
 void merge(Mapper mergeWith, MergeContext mergeContext)
           
 org.apache.lucene.search.Filter nullValueFilter()
          Null value filter, returns null if there is no null value associated with the field.
 void parse(ParseContext context)
           
 void postParse(ParseContext context)
           
 void preParse(ParseContext context)
           
 org.apache.lucene.search.Filter rangeFilter(FieldDataCache fieldDataCache, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper, QueryParseContext context)
          A range filter based on the field data cache.
 org.apache.lucene.search.Filter rangeFilter(String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper, QueryParseContext context)
          Constructs a range query filter based on the mapper.
 org.apache.lucene.search.Query rangeQuery(String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper, QueryParseContext context)
          Constructs a range query based on the mapper.
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 void validate(ParseContext context)
           
 Float value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 Float valueFromString(String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.core.NumberFieldMapper
close, doXContentBody, fieldFilter, fieldQuery, includeInAll, includeInAllIfNotSet, parseCreateField, parseFuzzyFactor, popCachedStream, precisionStep, useFieldQueryWithQueryString, valueAsString, valueForSearch
 
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
analyzed, boost, customBoost, 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
 
Methods inherited from interface org.elasticsearch.index.mapper.Mapper
close, name, traverse, traverse
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

BoostFieldMapper

public BoostFieldMapper()

BoostFieldMapper

protected BoostFieldMapper(String name,
                           String indexName)

BoostFieldMapper

protected BoostFieldMapper(String name,
                           String indexName,
                           int precisionStep,
                           org.apache.lucene.document.Field.Index index,
                           org.apache.lucene.document.Field.Store store,
                           float boost,
                           boolean omitNorms,
                           org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
                           Float nullValue)
Method Detail

maxPrecisionStep

protected int maxPrecisionStep()
Specified by:
maxPrecisionStep in class NumberFieldMapper<Float>

value

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

Specified by:
value in interface FieldMapper<Float>

valueFromString

public Float valueFromString(String value)
Specified by:
valueFromString in interface FieldMapper<Float>

indexedValue

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

Specified by:
indexedValue in interface FieldMapper<Float>
Overrides:
indexedValue in class AbstractFieldMapper<Float>

fuzzyQuery

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

fuzzyQuery

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

rangeQuery

public org.apache.lucene.search.Query rangeQuery(String lowerTerm,
                                                 String upperTerm,
                                                 boolean includeLower,
                                                 boolean includeUpper,
                                                 @Nullable
                                                 QueryParseContext context)
Description copied from interface: FieldMapper
Constructs a range query based on the mapper.

Specified by:
rangeQuery in interface FieldMapper<Float>
Specified by:
rangeQuery in class NumberFieldMapper<Float>

rangeFilter

public org.apache.lucene.search.Filter rangeFilter(String lowerTerm,
                                                   String upperTerm,
                                                   boolean includeLower,
                                                   boolean includeUpper,
                                                   @Nullable
                                                   QueryParseContext context)
Description copied from interface: FieldMapper
Constructs a range query filter based on the mapper.

Specified by:
rangeFilter in interface FieldMapper<Float>
Specified by:
rangeFilter in class NumberFieldMapper<Float>

rangeFilter

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

Specified by:
rangeFilter in class NumberFieldMapper<Float>

nullValueFilter

public org.apache.lucene.search.Filter nullValueFilter()
Description copied from interface: FieldMapper
Null value filter, returns null if there is no null value associated with the field.

Specified by:
nullValueFilter in interface FieldMapper<Float>
Overrides:
nullValueFilter in class AbstractFieldMapper<Float>

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

validate

public void validate(ParseContext context)
              throws MapperParsingException
Specified by:
validate in interface RootMapper
Throws:
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

parse

public void parse(ParseContext context)
           throws IOException
Specified by:
parse in interface Mapper
Overrides:
parse in class AbstractFieldMapper<Float>
Throws:
IOException

innerParseCreateField

protected org.apache.lucene.document.Fieldable innerParseCreateField(ParseContext context)
                                                              throws IOException
Specified by:
innerParseCreateField in class NumberFieldMapper<Float>
Throws:
IOException

fieldDataType

public FieldDataType fieldDataType()
Specified by:
fieldDataType in interface FieldMapper<Float>
Specified by:
fieldDataType in class NumberFieldMapper<Float>

contentType

protected String contentType()
Specified by:
contentType in class AbstractFieldMapper<Float>

toXContent

public XContentBuilder toXContent(XContentBuilder builder,
                                  ToXContent.Params params)
                           throws IOException
Specified by:
toXContent in interface ToXContent
Overrides:
toXContent in class AbstractFieldMapper<Float>
Throws:
IOException

merge

public void merge(Mapper mergeWith,
                  MergeContext mergeContext)
           throws MergeMappingException
Specified by:
merge in interface Mapper
Overrides:
merge in class NumberFieldMapper<Float>
Throws:
MergeMappingException


Copyright © 2009-2012. All Rights Reserved.