Is combined_script required or not in scripted_metric?

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:

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...

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?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.