Package org.elasticsearch.index.mapper
Enum RangeFieldMapper.RangeType
- java.lang.Object
-
- java.lang.Enum<RangeFieldMapper.RangeType>
-
- org.elasticsearch.index.mapper.RangeFieldMapper.RangeType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RangeFieldMapper.RangeType>
- Enclosing class:
- RangeFieldMapper
public static enum RangeFieldMapper.RangeType extends java.lang.Enum<RangeFieldMapper.RangeType>
Enum defining the type of range
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
name
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.apache.lucene.search.Query
containsQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
java.util.List<org.apache.lucene.index.IndexableField>
createFields(ParseContext context, java.lang.String name, RangeFieldMapper.Range range, boolean indexed, boolean docValued, boolean stored)
abstract org.apache.lucene.search.Query
dvRangeQuery(java.lang.String field, BinaryDocValuesRangeQuery.QueryType queryType, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
abstract org.apache.lucene.util.BytesRef
encodeRanges(java.util.Set<RangeFieldMapper.Range> ranges)
abstract org.apache.lucene.document.Field
getRangeField(java.lang.String name, RangeFieldMapper.Range range)
abstract org.apache.lucene.search.Query
intersectsQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
abstract java.lang.Object
maxValue()
abstract java.lang.Object
minValue()
abstract java.lang.Object
nextDown(java.lang.Object value)
abstract java.lang.Object
nextUp(java.lang.Object value)
java.lang.Object
parse(java.lang.Object value, boolean coerce)
java.lang.Object
parseFrom(RangeFieldMapper.RangeFieldType fieldType, XContentParser parser, boolean coerce, boolean included)
parses from value.java.lang.Object
parseTo(RangeFieldMapper.RangeFieldType fieldType, XContentParser parser, boolean coerce, boolean included)
parses to value.org.apache.lucene.search.Query
rangeQuery(java.lang.String field, boolean hasDocValues, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo, ShapeRelation relation, org.joda.time.DateTimeZone timeZone, DateMathParser dateMathParser, QueryShardContext context)
java.lang.String
typeName()
Get the associated type name.static RangeFieldMapper.RangeType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RangeFieldMapper.RangeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.abstract org.apache.lucene.search.Query
withinQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
-
-
-
Enum Constant Detail
-
IP
public static final RangeFieldMapper.RangeType IP
-
DATE
public static final RangeFieldMapper.RangeType DATE
-
FLOAT
public static final RangeFieldMapper.RangeType FLOAT
-
DOUBLE
public static final RangeFieldMapper.RangeType DOUBLE
-
INTEGER
public static final RangeFieldMapper.RangeType INTEGER
-
LONG
public static final RangeFieldMapper.RangeType LONG
-
-
Method Detail
-
values
public static RangeFieldMapper.RangeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RangeFieldMapper.RangeType c : RangeFieldMapper.RangeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RangeFieldMapper.RangeType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
typeName
public final java.lang.String typeName()
Get the associated type name.
-
getRangeField
public abstract org.apache.lucene.document.Field getRangeField(java.lang.String name, RangeFieldMapper.Range range)
-
createFields
public java.util.List<org.apache.lucene.index.IndexableField> createFields(ParseContext context, java.lang.String name, RangeFieldMapper.Range range, boolean indexed, boolean docValued, boolean stored)
-
parseFrom
public java.lang.Object parseFrom(RangeFieldMapper.RangeFieldType fieldType, XContentParser parser, boolean coerce, boolean included) throws java.io.IOException
parses from value. rounds according to included flag- Throws:
java.io.IOException
-
parseTo
public java.lang.Object parseTo(RangeFieldMapper.RangeFieldType fieldType, XContentParser parser, boolean coerce, boolean included) throws java.io.IOException
parses to value. rounds according to included flag- Throws:
java.io.IOException
-
minValue
public abstract java.lang.Object minValue()
-
maxValue
public abstract java.lang.Object maxValue()
-
nextUp
public abstract java.lang.Object nextUp(java.lang.Object value)
-
nextDown
public abstract java.lang.Object nextDown(java.lang.Object value)
-
withinQuery
public abstract org.apache.lucene.search.Query withinQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
-
containsQuery
public abstract org.apache.lucene.search.Query containsQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
-
intersectsQuery
public abstract org.apache.lucene.search.Query intersectsQuery(java.lang.String field, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
-
parse
public java.lang.Object parse(java.lang.Object value, boolean coerce)
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(java.lang.String field, boolean hasDocValues, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo, ShapeRelation relation, @Nullable org.joda.time.DateTimeZone timeZone, @Nullable DateMathParser dateMathParser, QueryShardContext context)
-
encodeRanges
public abstract org.apache.lucene.util.BytesRef encodeRanges(java.util.Set<RangeFieldMapper.Range> ranges) throws java.io.IOException
- Throws:
java.io.IOException
-
dvRangeQuery
public abstract org.apache.lucene.search.Query dvRangeQuery(java.lang.String field, BinaryDocValuesRangeQuery.QueryType queryType, java.lang.Object from, java.lang.Object to, boolean includeFrom, boolean includeTo)
-
-