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 classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
MetricAggregationBase.AbstractBuilder<BuilderT extends MetricAggregationBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<ScriptedMetricAggregation>
Json deserializer forScriptedMetricAggregation
-
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.final Script
Runs once on each shard after document collection is complete.final Script
Runs prior to any collection of documents.final Script
Run once per document collected.static ScriptedMetricAggregation
params()
A global object with script parameters forinit
,map
andcombine
scripts.final Script
Runs once on the coordinating node after all shards have returned their results.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
setupScriptedMetricAggregationDeserializer
(ObjectDeserializer<ScriptedMetricAggregation.Builder> op) Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
field, missing, script, serialize, setupMetricAggregationBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
_aggregationKind
in 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_script
is specified, the resulting state needs to be stored in thestate
object.API name:
map_script
-
params
A global object with script parameters forinit
,map
andcombine
scripts. 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_script
on each shard.API name:
reduce_script
-
serializeInternal
- Overrides:
serializeInternal
in classMetricAggregationBase
-
setupScriptedMetricAggregationDeserializer
protected static void setupScriptedMetricAggregationDeserializer(ObjectDeserializer<ScriptedMetricAggregation.Builder> op)
-