Skip to content
Snippets Groups Projects
Commit 1625682e authored by Aivaras Gotovskis's avatar Aivaras Gotovskis
Browse files

Add extended stats aggregation doc.

parent a1ee1d77
No related branches found
No related tags found
No related merge requests found
# Extended Stats Aggregation
> More info about extended stats aggregation is in the [official elasticsearch docs][1]
A multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
## Simple example
```JSON
{
"aggregations" : {
"agg_grades_stats" : {
"extended_stats" : { "field" : "grade" }
}
}
}
```
And now the query via DSL:
```php
$extendedStatsAggregation = new ExtendedStatsAggregation('grades_stats', 'grade');
$search = new Search();
$search->addAggregation($extendedStatsAggregation);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-extendedstats-aggregation.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment