Class InternalSignificantTerms<A extends InternalSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
- java.lang.Object
-
- org.elasticsearch.search.aggregations.InternalAggregation
-
- org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<A,B>
-
- org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms<A,B>
-
- All Implemented Interfaces:
Iterable<SignificantTerms.Bucket>,NamedWriteable,Writeable,ToXContent,ToXContentFragment,Aggregation,MultiBucketsAggregation,SignificantTerms
- Direct Known Subclasses:
InternalMappedSignificantTerms,UnmappedSignificantTerms
public abstract class InternalSignificantTerms<A extends InternalSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>> extends InternalMultiBucketAggregation<A,B> implements SignificantTerms
Result of the significant terms aggregation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternalSignificantTerms.Bucket<B extends InternalSignificantTerms.Bucket<B>>-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static StringBG_COUNTprotected longminDocCountprotected intrequiredSizestatic StringSCORE-
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metaData, name
-
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInternalSignificantTerms(String name, int requiredSize, long minDocCount, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)protectedInternalSignificantTerms(StreamInput in)Read from a stream.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Acreate(long subsetSize, long supersetSize, List<B> buckets)protected abstract B[]createBucketsArray(int size)Create an array to hold some buckets.InternalAggregationdoReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)protected voiddoWriteTo(StreamOutput out)booleanequals(Object obj)abstract List<B>getBuckets()protected abstract SignificanceHeuristicgetSignificanceHeuristic()protected abstract longgetSubsetSize()protected abstract longgetSupersetSize()inthashCode()protected BreduceBucket(List<B> buckets, InternalAggregation.ReduceContext context)Reduce a list of same-keyed buckets (from multiple shards) to a single bucket.protected abstract voidwriteTermTypeInfoTo(StreamOutput out)-
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
countInnerBucket, countInnerBucket, create, createBucket, getProperty
-
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
doXContentBody, getMetaData, getName, getProperty, getType, isMapped, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms
getBucketByKey
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
SCORE
public static final String SCORE
- See Also:
- Constant Field Values
-
BG_COUNT
public static final String BG_COUNT
- See Also:
- Constant Field Values
-
requiredSize
protected final int requiredSize
-
minDocCount
protected final long minDocCount
-
-
Constructor Detail
-
InternalSignificantTerms
protected InternalSignificantTerms(String name, int requiredSize, long minDocCount, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)
-
InternalSignificantTerms
protected InternalSignificantTerms(StreamInput in) throws IOException
Read from a stream.- Throws:
IOException
-
-
Method Detail
-
doWriteTo
protected final void doWriteTo(StreamOutput out) throws IOException
- Specified by:
doWriteToin classInternalAggregation- Throws:
IOException
-
writeTermTypeInfoTo
protected abstract void writeTermTypeInfoTo(StreamOutput out) throws IOException
- Throws:
IOException
-
getBuckets
public abstract List<B> getBuckets()
- Specified by:
getBucketsin interfaceMultiBucketsAggregation- Specified by:
getBucketsin interfaceSignificantTerms- Specified by:
getBucketsin classInternalMultiBucketAggregation<A extends InternalSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>- Returns:
- The buckets of this aggregation.
-
doReduce
public InternalAggregation doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
- Specified by:
doReducein classInternalAggregation
-
reduceBucket
protected B reduceBucket(List<B> buckets, InternalAggregation.ReduceContext context)
Description copied from class:InternalMultiBucketAggregationReduce a list of same-keyed buckets (from multiple shards) to a single bucket. This requires all buckets to have the same key.- Specified by:
reduceBucketin classInternalMultiBucketAggregation<A extends InternalSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
createBucketsArray
protected abstract B[] createBucketsArray(int size)
Create an array to hold some buckets. Used in collecting the results.
-
getSubsetSize
protected abstract long getSubsetSize()
-
getSupersetSize
protected abstract long getSupersetSize()
-
getSignificanceHeuristic
protected abstract SignificanceHeuristic getSignificanceHeuristic()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classInternalAggregation
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classInternalAggregation
-
-