Kibana version: 5.1.1
Elasticsearch version: 5.1.1
Server OS version: cloud.elastic.co
Browser version: Chrome 55.0.2883.87 m
Browser OS version: Windows 7
Original install method (e.g. download page, yum, from source, etc.): cloud.elastic.co
Description of the problem including expected versus actual behavior:
Expected to see decimal places been populated in the label for a scaled_float.
Current behaviour is: The number ignores the decimal places in the label.
The discovery tab shows the numbers as expected (with 6 decimal places)
We are using numbers with 6 decimal places so having a large scaling factor:
"ctMultiplier": {
"scaling_factor": 1000000,
"type": "scaled_float"
}
Those get translated properly in the discovery tab. Example values are:
Those get presented as:
Steps to reproduce:
Using the query generated by kibana in console gets the same values back.
GET _search
{
"query": {
"bool": {
"must": [
{
"query_string": {
"analyze_wildcard": true,
"query": "*"
}
},
{
"range": {
"timestamp": {
"gte": 1450610296988,
"lte": 1482232696988,
"format": "epoch_millis"
}
}
}
],
"must_not": []
}
},
"size": 0,
"_source": {
"excludes": []
},
"aggs": {
"2": {
"terms": {
"field": "ctMultiplier",
"size": 5,
"order": {
"_count": "desc"
}
}
}
}
}
returns
{
"took": 53,
"timed_out": false,
"_shards": {
"total": 49,
"successful": 49,
"failed": 0
},
"hits": {
"total": 2904831,
"max_score": 0,
"hits": []
},
"aggregations": {
"2": {
"doc_count_error_upper_bound": 12,
"sum_other_doc_count": 771,
"buckets": [
{
"key": 1,
"doc_count": 970061
},
{
"key": 6,
"doc_count": 205777
},
{
"key": 2,
"doc_count": 65546
},
{
"key": 0,
"doc_count": 2408
},
{
"key": 153,
"doc_count": 22
}
]
}
}
}
So this might be a problem with elasticsearch?? Apologies if that is the case and do move this issue to elasticsearch in that case.
Errors in browser console (if relevant):
No errors in the console.
Provide logs and/or server output (if relevant):
Nothing
* Alternative solution *
Adding a scripted field with the following details allows me to show the correct values, but its pretty slow in big queries
Name ctMultiplier.decimal
Language painless
Type number
Format Number
Numeral.js format pattern 0,0.[000]
Script doc["ctMultiplier"].value
Thanks
hi @ISMAELMARTINEZ thanks for submitting.
There does seem to be an issue in the ES-response, but perhaps this is due to the way Kibana is sending the query. Looking for some feedback from the ES-side. Please stay tuned..
closing here, please track with https://github.com/elastic/elasticsearch/issues/22350 instead.
The fix has been pushed for elasticsearch 5.2. Thanks for the report @ISMAELMARTINEZ and @thomasneirynck !
Just a quick question, do you have a place where indicates the date planned for future releases? Thanks for the quick response and the fix!! Cheers
@ISMAELMARTINEZ there isn't an online schedule afaik. On the PRs, authors label the name of the branch that a feature needs to go, which gives some indication. e.g. https://github.com/elastic/elasticsearch/pull/22351 is labeled with 5.2.0. Since the current minor is 5.1, it will be in the next one. Judging from the past, there's a few minors each year.
Most helpful comment
The fix has been pushed for elasticsearch 5.2. Thanks for the report @ISMAELMARTINEZ and @thomasneirynck !