You are looking at documentation for an older release. Not what you want? See the current release documentation.
Use a Painless script in an bucket aggregation to calculate a value as a result in a bucket.
- User-defined parameters passed in as part of the query. The parameters
include values defined as part of the
- The calculated value as the result.
The standard Painless API is available.