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

Add Percentile Ranks aggregation doc.

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