public class IpFieldMapper extends NumberFieldMapper<Long>
Modifier and Type | Class and Description |
---|---|
static class |
IpFieldMapper.Builder |
static class |
IpFieldMapper.Defaults |
static class |
IpFieldMapper.NumericIpAnalyzer |
static class |
IpFieldMapper.NumericIpTokenizer |
static class |
IpFieldMapper.TypeParser |
NumberFieldMapper.CustomLongNumericDocValuesField, NumberFieldMapper.CustomNumericDocValuesField, NumberFieldMapper.CustomNumericField
AbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFields
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
FieldMapper.Loading, FieldMapper.Names
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
coerce, ignoreMalformed, includeInAll, precisionStep, useSortedNumericDocValues
boost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarity
EMPTY_ARRAY
EMPTY_PARAMS
DOC_VALUES_FORMAT
Modifier | Constructor and Description |
---|---|
protected |
IpFieldMapper(FieldMapper.Names names,
int precisionStep,
float boost,
org.apache.lucene.document.FieldType fieldType,
Boolean docValues,
String nullValue,
Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce,
PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider,
SimilarityProvider similarity,
FieldMapper.Loading normsLoading,
Settings fieldDataSettings,
Settings indexSettings,
AbstractFieldMapper.MultiFields multiFields,
AbstractFieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
protected String |
contentType() |
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
org.apache.lucene.search.Query |
fuzzyQuery(String value,
Fuzziness fuzziness,
int prefixLength,
int maxExpansions,
boolean transpositions) |
org.apache.lucene.util.BytesRef |
indexedValueForSearch(Object value)
Returns the indexed value used to construct search "values".
|
protected void |
innerParseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields) |
static long |
ipToLong(String ip) |
static String |
longToIp(long longIp) |
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(Object lowerTerm,
Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryParseContext context) |
org.apache.lucene.search.Filter |
rangeFilter(QueryParseContext parseContext,
Object lowerTerm,
Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryParseContext context)
A range filter based on the field data cache.
|
org.apache.lucene.search.Query |
rangeQuery(Object lowerTerm,
Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryParseContext context) |
Long |
value(Object value)
Returns the actual value of the field.
|
Object |
valueForSearch(Object value)
IPs should return as a string.
|
addDocValue, close, fieldDataTermsFilter, includeInAll, includeInAllIfNotSet, isNumeric, parseCreateField, parseDoubleValue, parseLongValue, popCachedStream, precisionStep, termFilter, termQuery, unsetIncludeInAll, useTermQueryWithQueryString
boost, copyTo, customBoost, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, fieldDataType, fieldType, hasDocValues, indexAnalyzer, indexOptionToString, indexTokenizeOptionToString, isGenerated, isSortable, name, names, normsLoading, parse, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termsFilter, termVectorOptionsToString, toXContent, traverse, traverse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
name, parse, traverse, traverse
toXContent
public static final String CONTENT_TYPE
protected IpFieldMapper(FieldMapper.Names names, int precisionStep, float boost, org.apache.lucene.document.FieldType fieldType, Boolean docValues, String nullValue, Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, SimilarityProvider similarity, FieldMapper.Loading normsLoading, @Nullable Settings fieldDataSettings, Settings indexSettings, AbstractFieldMapper.MultiFields multiFields, AbstractFieldMapper.CopyTo copyTo)
public static String longToIp(long longIp)
public static long ipToLong(String ip) throws ElasticsearchIllegalArgumentException
public org.apache.lucene.document.FieldType defaultFieldType()
defaultFieldType
in class AbstractFieldMapper<Long>
public FieldDataType defaultFieldDataType()
defaultFieldDataType
in class AbstractFieldMapper<Long>
protected int maxPrecisionStep()
maxPrecisionStep
in class NumberFieldMapper<Long>
public Long value(Object value)
FieldMapper
public Object valueForSearch(Object value)
valueForSearch
in interface FieldMapper<Long>
valueForSearch
in class NumberFieldMapper<Long>
public org.apache.lucene.util.BytesRef indexedValueForSearch(Object value)
FieldMapper
indexedValueForSearch
in interface FieldMapper<Long>
indexedValueForSearch
in class AbstractFieldMapper<Long>
public org.apache.lucene.search.Query fuzzyQuery(String value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions)
fuzzyQuery
in interface FieldMapper<Long>
fuzzyQuery
in class NumberFieldMapper<Long>
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, @Nullable QueryParseContext context)
rangeQuery
in interface FieldMapper<Long>
rangeQuery
in class NumberFieldMapper<Long>
public org.apache.lucene.search.Filter rangeFilter(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, @Nullable QueryParseContext context)
rangeFilter
in interface FieldMapper<Long>
rangeFilter
in class NumberFieldMapper<Long>
public org.apache.lucene.search.Filter rangeFilter(QueryParseContext parseContext, Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, @Nullable QueryParseContext context)
NumberFieldMapper
rangeFilter
in class NumberFieldMapper<Long>
public org.apache.lucene.search.Filter nullValueFilter()
FieldMapper
nullValueFilter
in interface FieldMapper<Long>
nullValueFilter
in class AbstractFieldMapper<Long>
protected void innerParseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
innerParseCreateField
in class NumberFieldMapper<Long>
IOException
protected String contentType()
contentType
in class AbstractFieldMapper<Long>
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class NumberFieldMapper<Long>
MergeMappingException
protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody
in class NumberFieldMapper<Long>
IOException
Copyright © 2009–2015. All rights reserved.