Class InternalMappedSignificantTerms<A extends InternalMappedSignificantTerms<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>
-
- org.elasticsearch.search.aggregations.bucket.significant.InternalMappedSignificantTerms<A,B>
-
- All Implemented Interfaces:
java.lang.Iterable<SignificantTerms.Bucket>,NamedWriteable,Writeable,ToXContent,ToXContentFragment,Aggregation,MultiBucketsAggregation,SignificantTerms
- Direct Known Subclasses:
SignificantLongTerms,SignificantStringTerms
public abstract class InternalMappedSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>> extends InternalSignificantTerms<A,B>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms
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 protected java.util.Map<java.lang.String,B>bucketMapprotected java.util.List<B>bucketsprotected DocValueFormatformatprotected SignificanceHeuristicsignificanceHeuristicprotected longsubsetSizeprotected longsupersetSize-
Fields inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms
BG_COUNT, minDocCount, requiredSize, 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 protectedInternalMappedSignificantTerms(java.lang.String name, int requiredSize, long minDocCount, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData, DocValueFormat format, long subsetSize, long supersetSize, SignificanceHeuristic significanceHeuristic, java.util.List<B> buckets)protectedInternalMappedSignificantTerms(StreamInput in, InternalSignificantTerms.Bucket.Reader<B> bucketReader)
-
Method Summary
Modifier and Type Method Description 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.XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent.Params params)BgetBucketByKey(java.lang.String term)Get the bucket for the given term, or null if there is no such bucket.java.util.List<B>getBuckets()protected SignificanceHeuristicgetSignificanceHeuristic()protected longgetSubsetSize()protected longgetSupersetSize()java.util.Iterator<SignificantTerms.Bucket>iterator()protected voidwriteTermTypeInfoTo(StreamOutput out)-
Methods inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms
create, createBucketsArray, doReduce, doWriteTo
-
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
countInnerBucket, countInnerBucket, create, createBucket, getProperty
-
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
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.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
format
protected final DocValueFormat format
-
subsetSize
protected final long subsetSize
-
supersetSize
protected final long supersetSize
-
significanceHeuristic
protected final SignificanceHeuristic significanceHeuristic
-
buckets
protected final java.util.List<B extends InternalSignificantTerms.Bucket<B>> buckets
-
bucketMap
protected java.util.Map<java.lang.String,B extends InternalSignificantTerms.Bucket<B>> bucketMap
-
-
Constructor Detail
-
InternalMappedSignificantTerms
protected InternalMappedSignificantTerms(java.lang.String name, int requiredSize, long minDocCount, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData, DocValueFormat format, long subsetSize, long supersetSize, SignificanceHeuristic significanceHeuristic, java.util.List<B> buckets)
-
InternalMappedSignificantTerms
protected InternalMappedSignificantTerms(StreamInput in, InternalSignificantTerms.Bucket.Reader<B> bucketReader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTermTypeInfoTo
protected final void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
- Specified by:
writeTermTypeInfoToin classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>- Throws:
java.io.IOException
-
iterator
public java.util.Iterator<SignificantTerms.Bucket> iterator()
-
getBuckets
public java.util.List<B> getBuckets()
- Specified by:
getBucketsin interfaceMultiBucketsAggregation- Specified by:
getBucketsin interfaceSignificantTerms- Specified by:
getBucketsin classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>- Returns:
- The buckets of this aggregation.
-
getBucketByKey
public B getBucketByKey(java.lang.String term)
Description copied from interface:SignificantTermsGet the bucket for the given term, or null if there is no such bucket.
-
getSubsetSize
protected long getSubsetSize()
- Specified by:
getSubsetSizein classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
getSupersetSize
protected long getSupersetSize()
- Specified by:
getSupersetSizein classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
getSignificanceHeuristic
protected SignificanceHeuristic getSignificanceHeuristic()
- Specified by:
getSignificanceHeuristicin classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
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- Overrides:
doEqualsin classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
doHashCode
protected int doHashCode()
Description copied from class:InternalAggregationOpportunity for subclasses to theInternalAggregation.hashCode()for this class.- Overrides:
doHashCodein classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
doXContentBodyin classInternalAggregation- Throws:
java.io.IOException
-
-