NamedWriteable, Writeable, DocValueFormatpublic static final class DocValueFormat.DateTime extends java.lang.Object implements DocValueFormat
DocValueFormat.DateTime, DocValueFormat.DecimalWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NAME |
BOOLEAN, GEOHASH, IP, RAW| Constructor | Description |
|---|---|
DateTime(StreamInput in) |
|
DateTime(FormatDateTimeFormatter formatter,
org.joda.time.DateTimeZone timeZone) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
format(double value) |
Format a double value.
|
java.lang.String |
format(long value) |
Format a long value.
|
java.lang.String |
format(org.apache.lucene.util.BytesRef value) |
Format a binary value.
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
org.apache.lucene.util.BytesRef |
parseBytesRef(java.lang.String value) |
Parse a value that was formatted with
DocValueFormat.format(BytesRef) back
to the original BytesRef. |
double |
parseDouble(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now) |
Parse a value that was formatted with
DocValueFormat.format(double) back to
the original double value. |
long |
parseLong(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now) |
Parse a value that was formatted with
DocValueFormat.format(long) back to the
original long value. |
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
public static final java.lang.String NAME
public DateTime(FormatDateTimeFormatter formatter, org.joda.time.DateTimeZone timeZone)
public DateTime(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteablepublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String format(long value)
DocValueFormatlong and date fields.format in interface DocValueFormatpublic java.lang.String format(double value)
DocValueFormatlong, double or date fields.format in interface DocValueFormatpublic java.lang.String format(org.apache.lucene.util.BytesRef value)
DocValueFormatkeyword and ip fields.format in interface DocValueFormatpublic long parseLong(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now)
DocValueFormatDocValueFormat.format(long) back to the
original long value.parseLong in interface DocValueFormatpublic double parseDouble(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now)
DocValueFormatDocValueFormat.format(double) back to
the original double value.parseDouble in interface DocValueFormatpublic org.apache.lucene.util.BytesRef parseBytesRef(java.lang.String value)
DocValueFormatDocValueFormat.format(BytesRef) back
to the original BytesRef.parseBytesRef in interface DocValueFormat