Package org.elasticsearch.search
Class DocValueFormat.UnsignedLongShiftedDocValueFormat
java.lang.Object
org.elasticsearch.search.DocValueFormat.UnsignedLongShiftedDocValueFormat
- All Implemented Interfaces:
NamedWriteable
,Writeable
,DocValueFormat
- Enclosing interface:
- DocValueFormat
public static class DocValueFormat.UnsignedLongShiftedDocValueFormat
extends Object
implements DocValueFormat
DocValues format for unsigned 64 bit long values,
that are stored as shifted signed 64 bit long values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.DocValueFormat
DocValueFormat.BinaryDocValueFormat, DocValueFormat.BooleanDocValueFormat, DocValueFormat.DateTime, DocValueFormat.Decimal, DocValueFormat.GeoHashDocValueFormat, DocValueFormat.GeoTileDocValueFormat, DocValueFormat.IpDocValueFormat, DocValueFormat.RawDocValueFormat, DocValueFormat.UnsignedLongShiftedDocValueFormat
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.search.DocValueFormat
BIGINTEGER_2_64_MINUS_ONE, BINARY, BOOLEAN, GEOHASH, GEOTILE, IP, MASK_2_63, RAW, UNSIGNED_LONG_SHIFTED
-
Method Summary
Modifier and TypeMethodDescriptionformat
(double value) Double docValues of the unsigned_long field type are already in the formatted representation, so we don't need to do anything hereformat
(long value) Formats a raw docValue that is stored in the shifted long format to the unsigned long representation.formatSortValue
(Object value) Formats a value of a sort field in a search response.Returns the name of the writeable objectdouble
parseDouble
(String value, boolean roundUp, LongSupplier now) Parse a value that was formatted withDocValueFormat.format(double)
back to the original double value.long
parseLong
(String value, boolean roundUp, LongSupplier now) Formats the unsigned long to the shifted long formattoString()
void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.DocValueFormat
format, parseBytesRef
-
Field Details
-
INSTANCE
-
-
Method Details
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
toString
-
parseLong
Formats the unsigned long to the shifted long format- Specified by:
parseLong
in interfaceDocValueFormat
-
format
Formats a raw docValue that is stored in the shifted long format to the unsigned long representation.- Specified by:
format
in interfaceDocValueFormat
-
formatSortValue
Description copied from interface:DocValueFormat
Formats a value of a sort field in a search response. This is used bySearchSortValues
to avoid sending the internal representation of a value of a sort field in a search response. The default implementation formatsBytesRef
but leave other types as-is.- Specified by:
formatSortValue
in interfaceDocValueFormat
-
format
Double docValues of the unsigned_long field type are already in the formatted representation, so we don't need to do anything here- Specified by:
format
in interfaceDocValueFormat
-
parseDouble
Description copied from interface:DocValueFormat
Parse a value that was formatted withDocValueFormat.format(double)
back to the original double value.- Specified by:
parseDouble
in interfaceDocValueFormat
-