Let's create 3 products with sale_counts field:
PUT products/_mapping
{
"properties": {
"sales_count": {
"type": "integer"
}
}
}
POST products/_doc/
{
"sales_count" : 323,
}
POST products/_doc/
{
"sales_count" : 323,
}
POST products/_doc/
{
"sales_count" : 1000,
}
let's build sale percentiles aggregation bucket:
POST products/_search
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": []
}
},
"aggregations": {
"sales_percentiles": {
"percentiles": {
"field": "sales_count",
"percents": [
50,
95,
99
]
}
}
},
"from": 0,
"size": 50,
"timeout": "3000ms"
}
results are:
# ES 1.7.5
...
"aggregations": {
"sales_percentiles": { "values": { "50.0": 323,"95.0": 932.3,"99.0": 1000}}
}
# ES 7.1.1
...
"aggregations": {
"sales_percentiles": { "values": { "50.0": 323,"95.0": 1000,"99.0": 1000}}
}
the 95th percentile value is not the same between 2 ES versions.
I would like to ask if this is a bug.
Much thanks