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>
bucketMap
protected java.util.List<B>
buckets
protected DocValueFormat
format
protected SignificanceHeuristic
significanceHeuristic
protected long
subsetSize
protected long
supersetSize
-
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 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)
protected
InternalMappedSignificantTerms(StreamInput in, InternalSignificantTerms.Bucket.Reader<B> bucketReader)
-
Method Summary
Modifier and Type Method Description 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.XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
B
getBucketByKey(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 SignificanceHeuristic
getSignificanceHeuristic()
protected long
getSubsetSize()
protected long
getSupersetSize()
java.util.Iterator<SignificantTerms.Bucket>
iterator()
protected void
writeTermTypeInfoTo(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:
writeTermTypeInfoTo
in 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:
getBuckets
in interfaceMultiBucketsAggregation
- Specified by:
getBuckets
in interfaceSignificantTerms
- Specified by:
getBuckets
in 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:SignificantTerms
Get the bucket for the given term, or null if there is no such bucket.
-
getSubsetSize
protected long getSubsetSize()
- Specified by:
getSubsetSize
in classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
getSupersetSize
protected long getSupersetSize()
- Specified by:
getSupersetSize
in classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
getSignificanceHeuristic
protected SignificanceHeuristic getSignificanceHeuristic()
- Specified by:
getSignificanceHeuristic
in classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
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
- Overrides:
doEquals
in classInternalSignificantTerms<A extends InternalMappedSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
-
doHashCode
protected int doHashCode()
Description copied from class:InternalAggregation
Opportunity for subclasses to theInternalAggregation.hashCode()
for this class.- Overrides:
doHashCode
in 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:
doXContentBody
in classInternalAggregation
- Throws:
java.io.IOException
-
-