- All Superinterfaces:
NamedWriteable,Writeable
- All Known Implementing Classes:
DocValueFormat.BinaryDocValueFormat,DocValueFormat.BooleanDocValueFormat,DocValueFormat.DateTime,DocValueFormat.Decimal,DocValueFormat.GeoHashDocValueFormat,DocValueFormat.GeoTileDocValueFormat,DocValueFormat.IpDocValueFormat,DocValueFormat.RawDocValueFormat,DocValueFormat.TimeSeriesIdDocValueFormat,DocValueFormat.UnsignedLongShiftedDocValueFormat
A formatter for values as returned by the fielddata/doc-values APIs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSingleton, stateless formatter, for representing bytes as base64 stringsstatic classStateless, Singleton formatter for boolean values.static final classstatic final classstatic classSingleton, stateless formatter for geo hash valuesstatic classstatic classStateless, singleton formatter for IP address datastatic classSingleton, stateless formatter for "Raw" values, generally taken to mean keywords and other strings.static classDocValues format for time series id.static classDocValues format for unsigned 64 bit long values, that are stored as shifted signed 64 bit long values.Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigIntegerstatic final DocValueFormatstatic final DocValueFormatstatic final DocValueFormatstatic final DocValueFormatstatic final DocValueFormat.IpDocValueFormatstatic final longstatic final DocValueFormatstatic final DocValueFormatstatic final DocValueFormat -
Method Summary
Modifier and TypeMethodDescriptionstatic DocValueFormatenableFormatSortValues(DocValueFormat format) default Objectformat(double value) Format a double value.default Objectformat(long value) Format a long value.default Objectformat(org.apache.lucene.util.BytesRef value) Format a binary value.default ObjectformatSortValue(Object value) Formats a value of a sort field in a search response.default org.apache.lucene.util.BytesRefparseBytesRef(Object value) Parse a value that was formatted withformat(BytesRef)back to the original BytesRef.default doubleparseDouble(String value, boolean roundUp, LongSupplier now) Parse a value that was formatted withformat(double)back to the original double value.default longparseLong(String value, boolean roundUp, LongSupplier now) Parse a value that was formatted withformat(long)back to the original long value.static DocValueFormatMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Field Details
-
MASK_2_63
static final long MASK_2_63- See Also:
-
BIGINTEGER_2_64_MINUS_ONE
-
RAW
-
BINARY
-
GEOHASH
-
GEOTILE
-
BOOLEAN
-
IP
-
UNSIGNED_LONG_SHIFTED
-
TIME_SERIES_ID
-
-
Method Details
-
format
Format a long value. This is used by terms and histogram aggregations to format keys for fields that use longs as a doc value representation such as thelonganddatefields. -
format
Format a double value. This is used by terms and stats aggregations to format keys for fields that use numbers as a doc value representation such as thelong,doubleordatefields. -
format
Format a binary value. This is used by terms aggregations to format keys for fields that use binary doc value representations such as thekeywordandipfields. -
parseLong
Parse a value that was formatted withformat(long)back to the original long value. -
parseDouble
Parse a value that was formatted withformat(double)back to the original double value. -
parseBytesRef
Parse a value that was formatted withformat(BytesRef)back to the original BytesRef. -
formatSortValue
Formats a value of a sort field in a search response. This is used bySearchSortValuesto avoid sending the internal representation of a value of a sort field in a search response. The default implementation formatsBytesRefbut leave other types as-is. -
withNanosecondResolution
-
enableFormatSortValues
-