Package org.elasticsearch.index.mapper
Enum Class DateFieldMapper.Resolution
java.lang.Object
java.lang.Enum<DateFieldMapper.Resolution>
org.elasticsearch.index.mapper.DateFieldMapper.Resolution
- All Implemented Interfaces:
Serializable,Comparable<DateFieldMapper.Resolution>,Constable
- Enclosing class:
- DateFieldMapper
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract InstantclampToValidRange(Instant instant)Return the instant that this range can represent that is closest to the provided instant.abstract longConvert an Instant into a long value in this resolution.protected abstract org.apache.lucene.search.QuerydistanceFeatureQuery(String field, float boost, long origin, org.elasticsearch.core.TimeValue pivot)static DateFieldMapper.ResolutionofOrdinal(int ord)abstract longparsePointAsMillis(byte[] value)Decode the points representation of this field as milliseconds.abstract longroundDownToMillis(long value)Round the given raw value down to a number of milliseconds since the epoch.abstract longroundUpToMillis(long value)Round the given raw value up to a number of milliseconds since the epoch.abstract InstanttoInstant(long value)Convert a long value in this resolution into an instant.type()static DateFieldMapper.ResolutionReturns the enum constant of this class with the specified name.static DateFieldMapper.Resolution[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MILLISECONDS
-
NANOSECONDS
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
type
-
convert
Convert an Instant into a long value in this resolution. -
toInstant
Convert a long value in this resolution into an instant. -
clampToValidRange
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
-
distanceFeatureQuery
protected abstract org.apache.lucene.search.Query distanceFeatureQuery(String field, float boost, long origin, org.elasticsearch.core.TimeValue pivot)
-