-
Aivaras Gotovskis authoredAivaras Gotovskis authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Min Aggregation
More info about min aggregation is in the official elasticsearch docs
A single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents.
Simple example
{
"aggregations" : {
"min_price" : { "min" : { "field" : "price" } }
}
}
And now the query via DSL:
$minAggregation = new MinAggregation('min_price', 'price');
$search = new Search();
$search->addAggregation($minAggregation);
$queryArray = $search->toArray();