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.CustomNumericFieldAbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsFieldMapper.Loading, FieldMapper.Names| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE |
coerce, ignoreMalformed, includeInAll, precisionStep, useSortedNumericDocValuesboost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarityEMPTY_ARRAYEMPTY_PARAMSDOC_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, useTermQueryWithQueryStringboost, 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, stats, supportsNullValue, termsFilter, termVectorOptionsToString, toXContent, traverse, traverseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitname, parse, traverse, traversetoXContentpublic 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)
FieldMapperpublic Object valueForSearch(Object value)
valueForSearch in interface FieldMapper<Long>valueForSearch in class NumberFieldMapper<Long>public org.apache.lucene.util.BytesRef indexedValueForSearch(Object value)
FieldMapperindexedValueForSearch 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)
NumberFieldMapperrangeFilter in class NumberFieldMapper<Long>public org.apache.lucene.search.Filter nullValueFilter()
FieldMappernullValueFilter 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>IOExceptionprotected String contentType()
contentType in class AbstractFieldMapper<Long>public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge in interface Mappermerge in class NumberFieldMapper<Long>MergeMappingExceptionprotected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody in class NumberFieldMapper<Long>IOExceptionCopyright © 2009–2016. All rights reserved.