Hi there,
I was reading the documentation for scripted_metric aggregation here, but I feel it is a bit confusing.
I report what written there:
map_script
Executed once per document collected. This is a required script. If no combine_script is specified, the resulting state needs to be stored in the state
object...
combine_script
Executed once on each shard after document collection is complete. This is a required script.
How can it be that in one way the combine_script can be omitted, while later the doc says that it is required?
Is combined_script maybe required only if the index is configured to use multiple shards?
BR,
/A