public class IpFieldMapper extends NumberFieldMapper
Modifier and Type | Class and Description |
---|---|
static class |
IpFieldMapper.Builder |
static class |
IpFieldMapper.Defaults |
static class |
IpFieldMapper.IpFieldType |
static class |
IpFieldMapper.NumericIpAnalyzer |
static class |
IpFieldMapper.NumericIpTokenizer |
static class |
IpFieldMapper.TypeParser |
NumberFieldMapper.CustomLongNumericDocValuesField, NumberFieldMapper.CustomNumericDocValuesField, NumberFieldMapper.CustomNumericField, NumberFieldMapper.NumberFieldType
FieldMapper.CopyTo, FieldMapper.MultiFields
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
static long |
MAX_IP |
coerce, ignoreMalformed, includeInAll, useSortedNumericDocValues
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFields
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
IpFieldMapper(String simpleName,
MappedFieldType fieldType,
MappedFieldType defaultFieldType,
Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
static long[] |
cidrMaskToMinMax(String cidr)
Computes the min & max ip addresses (represented as long values -
same way as stored in index) represented by the given CIDR mask
expression.
|
protected String |
contentType() |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
protected void |
innerParseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields) |
static long |
ipToLong(String ip) |
static String |
longToIp(long longIp) |
addDocValue, clone, doMerge, includeInAll, includeInAllIfNotSet, parseCreateField, parseDoubleValue, parseLongValue, unsetIncludeInAll
copyTo, customBoost, doXContentAnalyzers, doXContentDocValues, fieldType, hasCustomFieldDataSettings, indexOptionToString, indexTokenizeOptionToString, isGenerated, iterator, merge, name, parse, termVectorOptionsToString, toXContent, updateFieldType
simpleName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final String CONTENT_TYPE
public static final long MAX_IP
protected IpFieldMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce, Settings indexSettings, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)
public static String longToIp(long longIp)
public static long ipToLong(String ip)
public static long[] cidrMaskToMinMax(String cidr)
min
address and the second the max
. A
-1
value for either the min
or the max
,
represents an unbounded end. In other words:
min == -1 == "0.0.0.0"
max == -1 == "255.255.255.255"
protected void innerParseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
innerParseCreateField
in class NumberFieldMapper
IOException
protected String contentType()
contentType
in class FieldMapper
protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody
in class NumberFieldMapper
IOException
Copyright © 2009–2016. All rights reserved.