Package org.elasticsearch.search
Class DocValueFormat.RawDocValueFormat
org.elasticsearch.search.DocValueFormat.RawDocValueFormat
- All Implemented Interfaces:
NamedWriteable
,Writeable
,DocValueFormat
- Enclosing interface:
- DocValueFormat
Singleton, stateless formatter for "Raw" values, generally taken to mean keywords and other strings.
-
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)
Format a double value.format(long value)
Format a long value.format(org.apache.lucene.util.BytesRef value)
Format a binary value.Returns the name of the writeable objectorg.apache.lucene.util.BytesRef
value)
Parse a value that was formatted withDocValueFormat.format(BytesRef)
back to the original BytesRef.double
value, boolean roundUp, now)
Parse a value that was formatted withDocValueFormat.format(double)
back to the original double value.long
value, boolean roundUp, now)
Parse a value that was formatted withDocValueFormat.format(long)
back to the original long value.toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.
, , , , , , , , ,
Methods inherited from interface org.elasticsearch.search.DocValueFormat
formatSortValue
-
Field Details
-
INSTANCE
-
-
Method Details
-
getWriteableName
public 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. -
format
public format(long value)Description copied from interface:DocValueFormat
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 thelong
anddate
fields.- Specified by:
format
in interfaceDocValueFormat
-
format
public format(double value)Description copied from interface:DocValueFormat
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
,double
ordate
fields.- Specified by:
format
in interfaceDocValueFormat
-
format
public format(org.apache.lucene.util.BytesRef value)Description copied from interface:DocValueFormat
Format a binary value. This is used by terms aggregations to format keys for fields that use binary doc value representations such as thekeyword
andip
fields.- Specified by:
format
in interfaceDocValueFormat
-
parseLong
public long parseLong( value, boolean roundUp, now)Description copied from interface:DocValueFormat
Parse a value that was formatted withDocValueFormat.format(long)
back to the original long value.- Specified by:
parseLong
in interfaceDocValueFormat
-
parseDouble
public double parseDouble( value, boolean roundUp, now)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
-
parseBytesRef
public org.apache.lucene.util.BytesRef parseBytesRef( value)Description copied from interface:DocValueFormat
Parse a value that was formatted withDocValueFormat.format(BytesRef)
back to the original BytesRef.- Specified by:
parseBytesRef
in interfaceDocValueFormat
-
toString
public toString()- Overrides:
in class
-