-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
Description
Originated from elastic/kibana#9568
For scaled_float type the expectation is that aggregations works on the scaled float value. For instance for the value "6.98" with a scaling factor of 10 the bucket "6.9" should be used.
Currently the aggregations use the long value of the scaled float to compute the buckets. So instead of "6.9" the created bucket is "6".
Steps to reproduce:
PUT t
{
"mappings": {
"t": {
"properties": {
"ctMultiplier": {
"scaling_factor": 10,
"type": "scaled_float",
"store": true
}
}
}
}
}
POST t/t/1
{
"ctMultiplier": "6.8"
}
POST t/t/2
{
"ctMultiplier": "6.9"
}
GET _search
{
"size": 0,
"aggs": {
"t": {
"terms": {
"field": "ctMultiplier"
}
}
}
}
ZhangDi-d