Class InternalRandomSampler
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation
org.elasticsearch.search.aggregations.bucket.sampler.random.InternalRandomSampler
- All Implemented Interfaces:
NamedWriteable,Writeable,Aggregation,Sampler,SingleBucketAggregation,HasAggregations,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoWriteTo(StreamOutput out) org.elasticsearch.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) getType()Returns the name of the writeable objectprotected InternalSingleBucketAggregationnewAggregation(String name, long docCount, InternalAggregations subAggregations) Create a new empty sub aggregation.reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Reduces the given aggregations to a single one and returns it.Methods inherited from class org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation
copyWithRewritenBuckets, create, equals, forEachBucket, getAggregations, getDocCount, getProperty, hashCode, mustReduceOnSingleInternalAgg, reducePipelines, sortValue, sortValueMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
finalizeSampling, getMetadata, getName, getProperty, isMapped, readSize, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getNameMethods inherited from interface org.elasticsearch.search.aggregations.bucket.SingleBucketAggregation
getAggregations, getDocCountMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
NAME
- See Also:
-
PARSER_NAME
- See Also:
-
-
Constructor Details
-
InternalRandomSampler
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Overrides:
doWriteToin classInternalSingleBucketAggregation- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable
-
getType
- Specified by:
getTypein interfaceAggregation- Overrides:
getTypein classInternalAggregation- Returns:
- a string representing the type of the aggregation. This type is added to the aggregation name in the response, so that it can later be used by clients to determine type of the aggregation and parse it into the proper object.
-
newAggregation
protected InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations) Description copied from class:InternalSingleBucketAggregationCreate a new empty sub aggregation. This must be a new instance on each call.- Specified by:
newAggregationin classInternalSingleBucketAggregation
-
reduce
public InternalAggregation reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Description copied from class:InternalAggregationReduces the given aggregations to a single one and returns it. In most cases, the assumption will be the all given aggregations are of the same type (the same type as this aggregation). For best efficiency, when implementing, try reusing an existing instance (typically the first in the given list) to save on redundant object construction.- Overrides:
reducein classInternalSingleBucketAggregation- See Also:
-
buildContext
-
doXContentBody
public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Overrides:
doXContentBodyin classInternalSingleBucketAggregation- Throws:
IOException
-