Writeable
, ToXContent
, MultiBucketsAggregation.Bucket
, Terms.Bucket
, HasAggregations
, KeyComparable<B>
LongTerms.Bucket
, StringTerms.Bucket
, UnmappedTerms.Bucket
public abstract static class InternalTerms.Bucket<B extends InternalTerms.Bucket<B>> extends InternalMultiBucketAggregation.InternalBucket implements Terms.Bucket, KeyComparable<B>
Modifier and Type | Class | Description |
---|---|---|
static interface |
InternalTerms.Bucket.Reader<B extends InternalTerms.Bucket<B>> |
Reads a bucket.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
protected InternalAggregations |
aggregations |
|
protected long |
docCount |
|
protected long |
docCountError |
|
protected DocValueFormat |
format |
|
protected boolean |
showDocCountError |
EMPTY_PARAMS
Modifier | Constructor | Description |
---|---|---|
protected |
Bucket(long docCount,
InternalAggregations aggregations,
boolean showDocCountError,
long docCountError,
DocValueFormat formatter) |
|
protected |
Bucket(StreamInput in,
DocValueFormat formatter,
boolean showDocCountError) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
Aggregations |
getAggregations() |
|
long |
getDocCount() |
|
long |
getDocCountError() |
|
int |
hashCode() |
|
protected abstract XContentBuilder |
keyToXContent(XContentBuilder builder) |
|
B |
reduce(java.util.List<B> buckets,
InternalAggregation.ReduceContext context) |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
protected abstract void |
writeTermTo(StreamOutput out) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
getProperty
compareKey
getKey, getKeyAsString
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getKeyAsNumber
isFragment
protected long docCount
protected long docCountError
protected InternalAggregations aggregations
protected final boolean showDocCountError
protected final DocValueFormat format
protected Bucket(long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat formatter)
protected Bucket(StreamInput in, DocValueFormat formatter, boolean showDocCountError) throws java.io.IOException
java.io.IOException
public final void writeTo(StreamOutput out) throws java.io.IOException
Writeable
protected abstract void writeTermTo(StreamOutput out) throws java.io.IOException
java.io.IOException
public long getDocCount()
getDocCount
in interface MultiBucketsAggregation.Bucket
public long getDocCountError()
getDocCountError
in interface Terms.Bucket
public Aggregations getAggregations()
getAggregations
in interface HasAggregations
getAggregations
in interface MultiBucketsAggregation.Bucket
public B reduce(java.util.List<B> buckets, InternalAggregation.ReduceContext context)
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
protected abstract XContentBuilder keyToXContent(XContentBuilder builder) throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object