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 class
InternalSignificantTerms.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.String
BG_COUNT
protected long
minDocCount
protected int
requiredSize
static java.lang.String
SCORE
-
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 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)
protected
InternalSignificantTerms(StreamInput in)
Read from a stream.
-
Method Summary
Modifier and Type Method Description protected abstract A
create(long subsetSize, long supersetSize, java.util.List<B> buckets)
protected abstract B[]
createBucketsArray(int size)
Create an array to hold some buckets.protected boolean
doEquals(java.lang.Object obj)
Opportunity for subclasses to add criteria to theInternalAggregation.equals(Object)
method for this class.protected int
doHashCode()
Opportunity for subclasses to theInternalAggregation.hashCode()
for this class.InternalAggregation
doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
protected void
doWriteTo(StreamOutput out)
abstract java.util.List<B>
getBuckets()
protected abstract SignificanceHeuristic
getSignificanceHeuristic()
protected abstract long
getSubsetSize()
protected abstract long
getSupersetSize()
protected abstract void
writeTermTypeInfoTo(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:
doWriteTo
in 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:
getBuckets
in interfaceMultiBucketsAggregation
- Specified by:
getBuckets
in interfaceSignificantTerms
- Specified by:
getBuckets
in 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:
doReduce
in 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:InternalAggregation
Opportunity for subclasses to theInternalAggregation.hashCode()
for this class.- Specified by:
doHashCode
in classInternalAggregation
-
doEquals
protected boolean doEquals(java.lang.Object obj)
Description copied from class:InternalAggregation
Opportunity for subclasses to add criteria to theInternalAggregation.equals(Object)
method for this class. This method can safely castobj
to the subclass since theInternalAggregation.equals(Object)
method checks thatobj
is the same class asthis
- Specified by:
doEquals
in classInternalAggregation
-
-