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:
java.lang.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 java.lang.StringBG_COUNTprotected longminDocCountprotected intrequiredSizestatic java.lang.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(java.lang.String name, int requiredSize, long minDocCount, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.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, java.util.List<B> buckets)protected abstract B[]createBucketsArray(int size)Create an array to hold some buckets.protected booleandoEquals(java.lang.Object obj)Opportunity for subclasses to add criteria to theInternalAggregation.equals(Object)method for this class.protected intdoHashCode()Opportunity for subclasses to theInternalAggregation.hashCode()for this class.InternalAggregationdoReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)protected voiddoWriteTo(StreamOutput out)abstract java.util.List<B>getBuckets()protected abstract SignificanceHeuristicgetSignificanceHeuristic()protected abstract longgetSubsetSize()protected abstract longgetSupersetSize()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, equals, getMetaData, getName, getProperty, getType, hashCode, 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 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 java.lang.String SCORE
- See Also:
- Constant Field Values
-
BG_COUNT
public static final java.lang.String BG_COUNT
- See Also:
- Constant Field Values
-
requiredSize
protected final int requiredSize
-
minDocCount
protected final long minDocCount
-
-
Constructor Detail
-
InternalSignificantTerms
protected InternalSignificantTerms(java.lang.String name, int requiredSize, long minDocCount, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
InternalSignificantTerms
protected InternalSignificantTerms(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
doWriteTo
protected final void doWriteTo(StreamOutput out) throws java.io.IOException
- Specified by:
doWriteToin classInternalAggregation- Throws:
java.io.IOException
-
writeTermTypeInfoTo
protected abstract void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
getBuckets
public abstract java.util.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(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
- Specified by:
doReducein classInternalAggregation
-
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()
-
doHashCode
protected int doHashCode()
Description copied from class:InternalAggregationOpportunity for subclasses to theInternalAggregation.hashCode()for this class.- Specified by:
doHashCodein classInternalAggregation
-
doEquals
protected boolean doEquals(java.lang.Object obj)
Description copied from class:InternalAggregationOpportunity for subclasses to add criteria to theInternalAggregation.equals(Object)method for this class. This method can safely castobjto the subclass since theInternalAggregation.equals(Object)method checks thatobjis the same class asthis- Specified by:
doEqualsin classInternalAggregation
-
-