Class RandomSamplerAggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase
co.elastic.clients.elasticsearch._types.aggregations.RandomSamplerAggregation
- All Implemented Interfaces:
AggregationVariant,JsonpSerializable
@JsonpDeserializable
public class RandomSamplerAggregation
extends BucketAggregationBase
implements AggregationVariant, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase
BucketAggregationBase.AbstractBuilder<BuilderT extends BucketAggregationBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RandomSamplerAggregation>Json deserializer forRandomSamplerAggregation -
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.static RandomSamplerAggregationfinal doubleRequired - The probability that a document will be included in the aggregated data.final Integerseed()The seed to generate the random sampling of documents.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal IntegerWhen combined with seed, setting shard_seed ensures 100% consistent sampling over shards where data is exactly the same.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch._types.aggregations.AggregationVariant
_toAggregation
-
Field Details
-
_DESERIALIZER
Json deserializer forRandomSamplerAggregation
-
-
Method Details
-
of
public static RandomSamplerAggregation of(Function<RandomSamplerAggregation.Builder, ObjectBuilder<RandomSamplerAggregation>> fn) -
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKindin interfaceAggregationVariant
-
probability
public final double 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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupRandomSamplerAggregationDeserializer
protected static void setupRandomSamplerAggregationDeserializer(ObjectDeserializer<RandomSamplerAggregation.Builder> op)
-