Class RandomSamplerAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<RandomSamplerAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.RandomSamplerAggregation.Builder
- All Implemented Interfaces:
WithJson<RandomSamplerAggregation.Builder>,ObjectBuilder<RandomSamplerAggregation>
- Enclosing class:
- RandomSamplerAggregation
public static class RandomSamplerAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<RandomSamplerAggregation.Builder>
implements ObjectBuilder<RandomSamplerAggregation>
Builder for
RandomSamplerAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aRandomSamplerAggregation.probability(double value) Required - The probability that a document will be included in the aggregated data.The seed to generate the random sampling of documents.protected RandomSamplerAggregation.Builderself()When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
probability
Required - The probability that a document will be included in the aggregated data. Must be greater than 0, less than 0.5, or exactly 1. The lower the probability, the fewer documents are matched.API name:
probability -
seed
The seed to generate the random sampling of documents. When a seed is provided, the random subset of documents is the same between calls.API name:
seed -
shardSeed
When combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same.API name:
shard_seed -
self
- Specified by:
selfin classBucketAggregationBase.AbstractBuilder<RandomSamplerAggregation.Builder>
-
build
Builds aRandomSamplerAggregation.- Specified by:
buildin interfaceObjectBuilder<RandomSamplerAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-