Module org.elasticsearch.server
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
,ToXContent
,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.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
FieldsFields 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.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doWriteTo
(StreamOutput out) doXContentBody
(XContentBuilder builder, ToXContent.Params params) protected AggregatorReducer
getLeaderReducer
(AggregationReduceContext reduceContext, int size) Return an object that Reduces several aggregations to a single one.getType()
Returns the name of the writeable objectprotected InternalSingleBucketAggregation
newAggregation
(String name, long docCount, InternalAggregations subAggregations) Create a new empty sub aggregation.Methods inherited from class org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation
copyWithRewritenBuckets, create, equals, forEachBucket, getAggregations, getDocCount, getProperty, hashCode, mustReduceOnSingleInternalAgg, reducePipelines, sortValue, sortValue
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
canLeadReduction, finalizeSampling, getMetadata, getName, getProperty, getReducer, readSize, 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
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.SingleBucketAggregation
getAggregations, getDocCount
Methods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContent
Methods 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:
doWriteTo
in classInternalSingleBucketAggregation
- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
-
getType
- Specified by:
getType
in interfaceAggregation
- Overrides:
getType
in 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:InternalSingleBucketAggregation
Create a new empty sub aggregation. This must be a new instance on each call.- Specified by:
newAggregation
in classInternalSingleBucketAggregation
-
getLeaderReducer
Description copied from class:InternalAggregation
Return an object that Reduces several aggregations to a single one. This method is called whenInternalAggregation.canLeadReduction()
returns true and expects an reducer that produces the right result.- Overrides:
getLeaderReducer
in classInternalSingleBucketAggregation
-
buildContext
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Overrides:
doXContentBody
in classInternalSingleBucketAggregation
- Throws:
IOException
-