org.elasticsearch.index.mapper.core
Class ShortFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.core.AbstractFieldMapper<T>
org.elasticsearch.index.mapper.core.NumberFieldMapper<Short>
org.elasticsearch.index.mapper.core.ShortFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<Short>, AllFieldMapper.IncludeInAll, Mapper
public class ShortFieldMapper
- extends NumberFieldMapper<Short>
Constructor Summary |
protected |
ShortFieldMapper(FieldMapper.Names names,
int precisionStep,
String fuzzyFactor,
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,
Short nullValue,
boolean ignoreMalformed)
|
Method Summary |
protected String |
contentType()
|
protected boolean |
customBoost()
Derived classes can override it to specify that boost value is set by derived classes. |
protected void |
doXContentBody(XContentBuilder builder)
|
FieldDataType |
fieldDataType()
|
org.apache.lucene.search.Filter |
fieldFilter(String value,
QueryParseContext context)
Numeric field level filter are basically range queries with same value and included. |
org.apache.lucene.search.Query |
fieldQuery(String value,
QueryParseContext context)
Numeric field level query are basically range queries with same value and included. |
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)
|
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. |
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. |
Short |
value(org.apache.lucene.document.Fieldable field)
Returns the actual value of the field. |
Short |
valueFromString(String value)
|
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper |
analyzed, boost, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, name, names, omitNorms, parse, prefixFilter, prefixQuery, queryStringTermQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, toXContent, traverse, traverse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
ShortFieldMapper
protected ShortFieldMapper(FieldMapper.Names names,
int precisionStep,
String fuzzyFactor,
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,
Short nullValue,
boolean ignoreMalformed)
maxPrecisionStep
protected int maxPrecisionStep()
- Specified by:
maxPrecisionStep
in class NumberFieldMapper<Short>
value
public Short value(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field.
valueFromString
public Short valueFromString(String value)
indexedValue
public String indexedValue(String value)
- Description copied from interface:
FieldMapper
- Returns the indexed value.
- Specified by:
indexedValue
in interface FieldMapper<Short>
- Overrides:
indexedValue
in class AbstractFieldMapper<Short>
fuzzyQuery
public org.apache.lucene.search.Query fuzzyQuery(String value,
String minSim,
int prefixLength,
int maxExpansions)
- Specified by:
fuzzyQuery
in interface FieldMapper<Short>
- Specified by:
fuzzyQuery
in class NumberFieldMapper<Short>
fuzzyQuery
public org.apache.lucene.search.Query fuzzyQuery(String value,
double minSim,
int prefixLength,
int maxExpansions)
- Specified by:
fuzzyQuery
in interface FieldMapper<Short>
- Specified by:
fuzzyQuery
in class NumberFieldMapper<Short>
fieldQuery
public org.apache.lucene.search.Query fieldQuery(String value,
@Nullable
QueryParseContext context)
- Description copied from class:
NumberFieldMapper
- Numeric field level query are basically range queries with same value and included. That's the recommended
way to execute it.
- Specified by:
fieldQuery
in interface FieldMapper<Short>
- Overrides:
fieldQuery
in class NumberFieldMapper<Short>
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<Short>
- Specified by:
rangeQuery
in class NumberFieldMapper<Short>
fieldFilter
public org.apache.lucene.search.Filter fieldFilter(String value,
@Nullable
QueryParseContext context)
- Description copied from class:
NumberFieldMapper
- Numeric field level filter are basically range queries with same value and included. That's the recommended
way to execute it.
- Specified by:
fieldFilter
in interface FieldMapper<Short>
- Overrides:
fieldFilter
in class NumberFieldMapper<Short>
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<Short>
- Specified by:
rangeFilter
in class NumberFieldMapper<Short>
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<Short>
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<Short>
- Overrides:
nullValueFilter
in class AbstractFieldMapper<Short>
customBoost
protected boolean customBoost()
- Description copied from class:
AbstractFieldMapper
- Derived classes can override it to specify that boost value is set by derived classes.
- Overrides:
customBoost
in class AbstractFieldMapper<Short>
innerParseCreateField
protected org.apache.lucene.document.Fieldable innerParseCreateField(ParseContext context)
throws IOException
- Specified by:
innerParseCreateField
in class NumberFieldMapper<Short>
- Throws:
IOException
fieldDataType
public FieldDataType fieldDataType()
- Specified by:
fieldDataType
in interface FieldMapper<Short>
- Specified by:
fieldDataType
in class NumberFieldMapper<Short>
contentType
protected String contentType()
- Specified by:
contentType
in class AbstractFieldMapper<Short>
merge
public void merge(Mapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface Mapper
- Overrides:
merge
in class NumberFieldMapper<Short>
- Throws:
MergeMappingException
doXContentBody
protected void doXContentBody(XContentBuilder builder)
throws IOException
- Overrides:
doXContentBody
in class NumberFieldMapper<Short>
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.