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

Add Percentiles aggregation doc.

parent 2c56ddbb
No related branches found
No related tags found
No related merge requests found
# Percentiles Aggregation
> More info about percentiles aggregation is in the [official elasticsearch docs][1]
A multi-value metrics aggregation that calculates one or more percentiles over
numeric values extracted from the aggregated documents.
## Simple example
```JSON
{
"aggregations" : {
"agg_load_time_outlier" : {
"percentiles" : {
"field" : "load_time"
}
}
}
}
```
And now the query via DSL:
```php
$percentilesAggregation = new PercentilesAggregation('load_time_outlier', 'load_time');
$search = new Search();
$search->addAggregation($percentilesAggregation);
$queryArray = $search->toArray();
```
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-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