public static class InternalHistogram.Bucket extends InternalMultiBucketAggregation.InternalBucket implements Histogram.Bucket
MultiBucketsAggregation.Bucket.SubAggregationComparator<B extends MultiBucketsAggregation.Bucket>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected ValueFormatter |
formatter |
EMPTY_PARAMS
Constructor and Description |
---|
Bucket(boolean keyed,
ValueFormatter formatter,
InternalHistogram.Factory<?> factory) |
Bucket(long key,
long docCount,
boolean keyed,
ValueFormatter formatter,
InternalHistogram.Factory<?> factory,
InternalAggregations aggregations) |
Modifier and Type | Method and Description |
---|---|
Aggregations |
getAggregations() |
long |
getDocCount() |
protected InternalHistogram.Factory<?> |
getFactory() |
ValueFormatter |
getFormatter() |
java.lang.Object |
getKey() |
java.lang.String |
getKeyAsString() |
boolean |
getKeyed() |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
getProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProperty
protected final transient ValueFormatter formatter
public Bucket(boolean keyed, ValueFormatter formatter, InternalHistogram.Factory<?> factory)
public Bucket(long key, long docCount, boolean keyed, ValueFormatter formatter, InternalHistogram.Factory<?> factory, InternalAggregations aggregations)
protected InternalHistogram.Factory<?> getFactory()
public java.lang.String getKeyAsString()
getKeyAsString
in interface MultiBucketsAggregation.Bucket
public java.lang.Object getKey()
getKey
in interface MultiBucketsAggregation.Bucket
public long getDocCount()
getDocCount
in interface MultiBucketsAggregation.Bucket
public Aggregations getAggregations()
getAggregations
in interface MultiBucketsAggregation.Bucket
getAggregations
in interface HasAggregations
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public ValueFormatter getFormatter()
public boolean getKeyed()