Percentile rank aggregations

Percentile rank is the percentile of values at or below a threshold grouped by a specified value. For example, if a value is greater than or equal to 80% of the values, it has a percentile rank of 80.

  1. GET opensearch_dashboards_sample_data_ecommerce/_search
  2. {
  3. "size": 0,
  4. "aggs": {
  5. "percentile_rank_taxful_total_price": {
  6. "percentile_ranks": {
  7. "field": "taxful_total_price",
  8. "values": [
  9. 10,
  10. 15
  11. ]
  12. }
  13. }
  14. }
  15. }

copy

Example response

  1. ...
  2. "aggregations" : {
  3. "percentile_rank_taxful_total_price" : {
  4. "values" : {
  5. "10.0" : 0.055096056411283456,
  6. "15.0" : 0.0830092961834656
  7. }
  8. }
  9. }
  10. }