Package org.elasticsearch.search
Interface DocValueFormat
- All Superinterfaces:
NamedWriteable,Writeable
- All Known Implementing Classes:
DocValueFormat.DateTime,DocValueFormat.Decimal
public interface DocValueFormat extends NamedWriteable
A formatter for values as returned by the fielddata/doc-values APIs.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDocValueFormat.DateTimestatic classDocValueFormat.DecimalNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static java.math.BigIntegerBIGINTEGER_2_64_MINUS_ONEstatic DocValueFormatBINARYstatic DocValueFormatBOOLEANstatic DocValueFormatGEOHASHstatic DocValueFormatGEOTILEstatic DocValueFormatIPstatic longMASK_2_63static DocValueFormatRAWstatic DocValueFormatUNSIGNED_LONG_SHIFTEDDocValues format for unsigned 64 bit long values, that are stored as shifted signed 64 bit long values. -
Method Summary
Modifier and Type Method Description default java.lang.Objectformat(double value)Format a double value.default java.lang.Objectformat(long value)Format a long value.default java.lang.Objectformat(org.apache.lucene.util.BytesRef value)Format a binary value.default org.apache.lucene.util.BytesRefparseBytesRef(java.lang.String value)Parse a value that was formatted withformat(BytesRef)back to the original BytesRef.default doubleparseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Parse a value that was formatted withformat(double)back to the original double value.default longparseLong(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Parse a value that was formatted withformat(long)back to the original long value.static DocValueFormatwithNanosecondResolution(DocValueFormat format)Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Field Details
-
MASK_2_63
static final long MASK_2_63- See Also:
- Constant Field Values
-
BIGINTEGER_2_64_MINUS_ONE
static final java.math.BigInteger BIGINTEGER_2_64_MINUS_ONE -
RAW
-
BINARY
-
GEOHASH
-
GEOTILE
-
BOOLEAN
-
IP
-
UNSIGNED_LONG_SHIFTED
DocValues format for unsigned 64 bit long values, that are stored as shifted signed 64 bit long values.
-
-
Method Details
-
format
default java.lang.Object format(long value)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
default java.lang.Object format(double value)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
default java.lang.Object format(org.apache.lucene.util.BytesRef value)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
default long parseLong(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Parse a value that was formatted withformat(long)back to the original long value. -
parseDouble
default double parseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Parse a value that was formatted withformat(double)back to the original double value. -
parseBytesRef
default org.apache.lucene.util.BytesRef parseBytesRef(java.lang.String value)Parse a value that was formatted withformat(BytesRef)back to the original BytesRef. -
withNanosecondResolution
-