Enum RangeType

java.lang.Object
java.lang.Enum<RangeType>
org.elasticsearch.index.mapper.RangeType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RangeType>, java.lang.constant.Constable

public enum RangeType
extends java.lang.Enum<RangeType>
Enum defining the type of range
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  RangeType.LengthType  

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    DATE  
    DOUBLE  
    FLOAT  
    INTEGER  
    IP  
    LONG  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    RangeType.LengthType lengthType  
    java.lang.String name  
  • Method Summary

    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 java.util.List<RangeFieldMapper.Range> decodeRanges​(org.apache.lucene.util.BytesRef bytes)  
    abstract java.lang.Double doubleValue​(java.lang.Object endpointValue)
    Given the Range.to or Range.from Object value from a Range instance, converts that value into a Double.
    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)  
    boolean isNumeric()  
    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, java.time.ZoneId timeZone, DateMathParser dateMathParser, QueryShardContext context)  
    java.lang.String typeName()
    Get the associated type name.
    static RangeType valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static 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)  

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static RangeType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static 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 name
      java.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 java.time.ZoneId 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
    • decodeRanges

      public abstract java.util.List<RangeFieldMapper.Range> decodeRanges​(org.apache.lucene.util.BytesRef bytes)
    • doubleValue

      public abstract java.lang.Double doubleValue​(java.lang.Object endpointValue)
      Given the Range.to or Range.from Object value from a Range instance, converts that value into a Double. Before converting, it asserts that the object is of the expected type. Operation is not supported on IP ranges (because of loss of precision)
      Parameters:
      endpointValue - Object value for Range.to or Range.from
      Returns:
      endpointValue as a Double
    • isNumeric

      public boolean isNumeric()
    • 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)