Enum DateFieldMapper.Resolution

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

public static enum DateFieldMapper.Resolution
extends java.lang.Enum<DateFieldMapper.Resolution>
  • Nested Class Summary

    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
    MILLISECONDS  
    NANOSECONDS  
  • Method Summary

    Modifier and Type Method Description
    abstract java.time.Instant clampToValidRange​(java.time.Instant instant)
    Return the instant that this range can represent that is closest to the provided instant.
    abstract long convert​(java.time.Instant instant)
    Convert an Instant into a long value in this resolution.
    protected abstract org.apache.lucene.search.Query distanceFeatureQuery​(java.lang.String field, float boost, long origin, org.elasticsearch.common.unit.TimeValue pivot)  
    static DateFieldMapper.Resolution ofOrdinal​(int ord)  
    abstract long parsePointAsMillis​(byte[] value)
    Decode the points representation of this field as milliseconds.
    abstract long roundDownToMillis​(long value)
    Round the given raw value down to a number of milliseconds since the epoch.
    abstract long roundUpToMillis​(long value)
    Round the given raw value up to a number of milliseconds since the epoch.
    abstract java.time.Instant toInstant​(long value)
    Convert a long value in this resolution into an instant.
    java.lang.String type()  
    static DateFieldMapper.Resolution valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static DateFieldMapper.Resolution[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    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

  • Method Details

    • values

      public static DateFieldMapper.Resolution[] 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 DateFieldMapper.Resolution 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
    • type

      public java.lang.String type()
    • convert

      public abstract long convert​(java.time.Instant instant)
      Convert an Instant into a long value in this resolution.
    • toInstant

      public abstract java.time.Instant toInstant​(long value)
      Convert a long value in this resolution into an instant.
    • clampToValidRange

      public abstract java.time.Instant clampToValidRange​(java.time.Instant instant)
      Return the instant that this range can represent that is closest to the provided instant.
    • parsePointAsMillis

      public abstract long parsePointAsMillis​(byte[] value)
      Decode the points representation of this field as milliseconds.
    • roundDownToMillis

      public abstract long roundDownToMillis​(long value)
      Round the given raw value down to a number of milliseconds since the epoch.
    • roundUpToMillis

      public abstract long roundUpToMillis​(long value)
      Round the given raw value up to a number of milliseconds since the epoch.
    • ofOrdinal

      public static DateFieldMapper.Resolution ofOrdinal​(int ord)
    • distanceFeatureQuery

      protected abstract org.apache.lucene.search.Query distanceFeatureQuery​(java.lang.String field, float boost, long origin, org.elasticsearch.common.unit.TimeValue pivot)