Aggregations Percentiles ES 6.2.4 VS ES 6.3.2

Hi I have a problems with Percentiles aggregations or better I would like to understand a different behaviour between two different minor versions of Elasticsearch :

Problems : find percentiles of this series (10 elements of integers values):

100,200,300,400,500,600,700,800,900,1000

expected values :
1st percentile --> 100.0
5th percentile --> 100.0
25th percentile --> 300.0
50th percentile --> 550.0
75th percentile --> 800.0
95th percentile --> 1000.0
99th percentile --> 1000.0

What happens is that with ES 6.2.4 I have these results

    1st percentile  --> 109.0
    5th percentile  --> 145.0
    25th percentile --> 325.0
    50th percentile --> 550.0
    75th percentile --> 775.0
    95th percentile --> 955.0
    99th percentile --> 991.0

What happens is that with ES 6.3.2 I have these results

   1st  percentile --> 100.0
5th  percentile --> 100.0
25th percentile --> 300.0
50th percentile --> 550.0
75th percentile --> 800.0
95th percentile --> 1000.0
99th percentile --> 1000.0

I've had a look at the docs, but nothing about minor bc or changes in the algorithm;
I've had a look at the ES source code, but again, nothing seems to have changed.
So anyone has an idea of what's happening ?
Maybe I'm doing something wrong or I forgot the math behind it :wink:

Thanks a lot.
Federico

For the people reading this, I've solved and it looks like from ES 6.3.x it has changed the implementation of the T-DIGEST algoriithm from 3.1 to 3.2 version which has a different implementation.
Have a look at this PR.

I'm considering this closed and solved.

@polyfractal or @javanna wouldn't be interesting updating the doc ? I understand that these are kind of ES internals, but I tried updating Elastica (@ruflin ) to 6.4.x version and all of the tests on Percentiles failed and I didn't know why :slight_smile:

Luckily searching on github allow me to understand why. What do u think ?

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.