for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Nord\Lumen\Elasticsearch\Search\Aggregation\Metrics;
/**
* A single-value metrics aggregation that keeps track and returns the maximum value among the numeric values extracted
* from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or
* be generated by a provided script.
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-max-aggregation.html
*/
class MaxAggregation extends AbstractAggregation
{
* @inheritdoc
public function toArray()
return [
'max' => [
'field' => $this->getField()
]
];
}