<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Percentiles_bucket on INFINI Pizza</title><link>https://pizza.rs/tags/percentiles_bucket/</link><description>Recent content in Percentiles_bucket on INFINI Pizza</description><generator>Hugo</generator><language>en</language><atom:link href="https://pizza.rs/tags/percentiles_bucket/index.xml" rel="self" type="application/rss+xml"/><item><title>Percentiles bucket aggregation</title><link>https://pizza.rs/docs/references/aggregation/pipeline/percentiles-bucket/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/references/aggregation/pipeline/percentiles-bucket/</guid><description>&lt;h1 id="percentiles-bucket-aggregation">
 Percentiles bucket aggregation
 &lt;a class="anchor" href="#percentiles-bucket-aggregation">#&lt;/a>
&lt;/h1>
&lt;p>A sibling pipeline aggregation computing percentiles of a metric across
buckets — e.g. &amp;ldquo;the daily-revenue p95&amp;rdquo;. The mean of the per-bucket
values answers &amp;ldquo;what is typical&amp;rdquo;; percentiles answer &amp;ldquo;what the whole
ladder of buckets looks like&amp;rdquo; — including the outlier end that a

 &lt;a href="https://pizza.rs/docs/references/aggregation/pipeline/stats-bucket/">&lt;code>stats_bucket&lt;/code>&lt;/a> min/max flattens into two numbers.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="s2">&amp;#34;day_pcts&amp;#34;&lt;/span>&lt;span class="err">:&lt;/span> &lt;span class="p">{&lt;/span> &lt;span class="nt">&amp;#34;percentiles_bucket&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span> &lt;span class="nt">&amp;#34;buckets_path&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;per_day&amp;gt;revenue&amp;#34;&lt;/span> &lt;span class="p">}&lt;/span> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="how-it-works">
 How it works
 &lt;a class="anchor" href="#how-it-works">#&lt;/a>
&lt;/h2>
&lt;p>&lt;code>percentiles_bucket&lt;/code> is declared &lt;strong>next to&lt;/strong> the bucket aggregation it
consumes and runs after every regular aggregation — including the
distributed merge — has finished. It walks the parent&amp;rsquo;s finished
buckets, collects one number per bucket, sorts them, and evaluates each
requested percentile over the sorted sample, returning a
&lt;code>{&amp;quot;values&amp;quot;: {...}}&lt;/code> object keyed by the percentile:&lt;/p></description></item></channel></rss>