Class ScriptedMetricAggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
co.elastic.clients.elasticsearch._types.aggregations.ScriptedMetricAggregation
- All Implemented Interfaces:
AggregationVariant,JsonpSerializable
@JsonpDeserializable
public class ScriptedMetricAggregation
extends MetricAggregationBase
implements AggregationVariant
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
MetricAggregationBase.AbstractBuilder<BuilderT extends MetricAggregationBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<ScriptedMetricAggregation>Json deserializer forScriptedMetricAggregation -
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.final ScriptRuns once on each shard after document collection is complete.final ScriptRuns prior to any collection of documents.final ScriptRun once per document collected.static ScriptedMetricAggregationparams()A global object with script parameters forinit,mapandcombinescripts.final ScriptRuns once on the coordinating node after all shards have returned their results.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidsetupScriptedMetricAggregationDeserializer(ObjectDeserializer<ScriptedMetricAggregation.Builder> op) Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
field, missing, script, serialize, setupMetricAggregationBaseDeserializer, toStringMethods 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 forScriptedMetricAggregation
-
-
Method Details
-
of
public static ScriptedMetricAggregation of(Function<ScriptedMetricAggregation.Builder, ObjectBuilder<ScriptedMetricAggregation>> fn) -
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKindin interfaceAggregationVariant
-
combineScript
Runs once on each shard after document collection is complete. Allows the aggregation to consolidate the state returned from each shard.API name:
combine_script -
initScript
Runs prior to any collection of documents. Allows the aggregation to set up any initial state.API name:
init_script -
mapScript
Run once per document collected. If nocombine_scriptis specified, the resulting state needs to be stored in thestateobject.API name:
map_script -
params
A global object with script parameters forinit,mapandcombinescripts. It is shared between the scripts.API name:
params -
reduceScript
Runs once on the coordinating node after all shards have returned their results. The script is provided with access to a variablestates, which is an array of the result of thecombine_scripton each shard.API name:
reduce_script -
serializeInternal
- Overrides:
serializeInternalin classMetricAggregationBase
-
setupScriptedMetricAggregationDeserializer
protected static void setupScriptedMetricAggregationDeserializer(ObjectDeserializer<ScriptedMetricAggregation.Builder> op)
-