public class UnmappedTerms extends InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
TermsAggregator
when the field is unmapped.Modifier and Type | Class and Description |
---|---|
protected static class |
UnmappedTerms.Bucket
Concrete type that can't be built because Java needs a concrent type so
InternalTerms.Bucket can have a self type but
UnmappedTerms doesn't ever need to build it because it never returns any buckets. |
InternalMultiBucketAggregation.InternalBucket
InternalAggregation.ReduceContext
Terms.Order
Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME, minDocCount, order, requiredSize, SUM_OF_OTHER_DOC_COUNTS
metaData, name
TYPED_KEYS_DELIMITER
EMPTY_PARAMS
Constructor and Description |
---|
UnmappedTerms(StreamInput in)
Read from a stream.
|
UnmappedTerms(java.lang.String name,
Terms.Order order,
int requiredSize,
long minDocCount,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method and Description |
---|---|
UnmappedTerms |
create(java.util.List<UnmappedTerms.Bucket> buckets)
Create a new copy of this
Aggregation with the same settings as
this Aggregation and contains the provided buckets. |
protected UnmappedTerms |
create(java.lang.String name,
java.util.List<UnmappedTerms.Bucket> buckets,
long docCountError,
long otherDocCount) |
UnmappedTerms.Bucket |
createBucket(InternalAggregations aggregations,
UnmappedTerms.Bucket prototype)
Create a new
InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
and aggregations. |
protected UnmappedTerms.Bucket[] |
createBucketsArray(int size)
Create an array to hold some buckets.
|
InternalAggregation |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
UnmappedTerms.Bucket |
getBucketByKey(java.lang.String term)
Get the bucket for the given term, or null if there is no such bucket.
|
java.util.List<UnmappedTerms.Bucket> |
getBuckets()
Return the sorted list of the buckets in this terms aggregation.
|
long |
getDocCountError()
Get an upper bound of the error on document counts in this aggregation.
|
protected int |
getShardSize() |
long |
getSumOfOtherDocCounts()
Return the sum of the document counts of all buckets that did not make
it to the top buckets.
|
java.lang.String |
getType() |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
protected void |
setDocCountError(long docCountError) |
protected void |
writeTermTypeInfoTo(StreamOutput out) |
doWriteTo, doXContentCommon
getProperty
getMetaData, getName, getProperty, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName
isFragment, toXContent
public static final java.lang.String NAME
public UnmappedTerms(java.lang.String name, Terms.Order order, int requiredSize, long minDocCount, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
public UnmappedTerms(StreamInput in) throws java.io.IOException
java.io.IOException
protected void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
writeTermTypeInfoTo
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
public java.lang.String getType()
getType
in interface Aggregation
getType
in class InternalAggregation
public UnmappedTerms create(java.util.List<UnmappedTerms.Bucket> buckets)
InternalMultiBucketAggregation
Aggregation
with the same settings as
this Aggregation
and contains the provided buckets.create
in class InternalMultiBucketAggregation<UnmappedTerms,UnmappedTerms.Bucket>
buckets
- the buckets to use in the new Aggregation
Aggregation
public UnmappedTerms.Bucket createBucket(InternalAggregations aggregations, UnmappedTerms.Bucket prototype)
InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
using the provided prototype bucket
and aggregations.createBucket
in class InternalMultiBucketAggregation<UnmappedTerms,UnmappedTerms.Bucket>
aggregations
- the aggregations for the new bucketprototype
- the bucket to use as a prototypeprotected UnmappedTerms create(java.lang.String name, java.util.List<UnmappedTerms.Bucket> buckets, long docCountError, long otherDocCount)
create
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
public InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
public final XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class InternalAggregation
java.io.IOException
protected void setDocCountError(long docCountError)
setDocCountError
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
protected int getShardSize()
getShardSize
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
public long getDocCountError()
Terms
public long getSumOfOtherDocCounts()
Terms
public java.util.List<UnmappedTerms.Bucket> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
getBuckets
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
public UnmappedTerms.Bucket getBucketByKey(java.lang.String term)
Terms
getBucketByKey
in interface Terms
getBucketByKey
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>
protected UnmappedTerms.Bucket[] createBucketsArray(int size)
InternalTerms
createBucketsArray
in class InternalTerms<UnmappedTerms,UnmappedTerms.Bucket>