Using ELK 7.10
When adding a filter via the Range Slider in Controls it uses gte/lte. You can also see a visual bug where the second value does not show in the filter.
{
"script": {
"script": {
"lang": "painless",
"params": {
"gte": 0,
"lte": 2,
"value": ">=0 <=2"
},
"source": "boolean gte(Supplier s, def v) {return s.get() >= v} boolean lte(Supplier s, def v) {return s.get() <= v}gte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.gte) && lte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.lte)"
}
}
}
If you add the filter manually from the "Add Filter" at the top, it applies gte/lt.
{
"script": {
"script": {
"lang": "painless",
"params": {
"gte": 0,
"lt": 2,
"value": ">=0 <2"
},
"source": "boolean gte(Supplier s, def v) {return s.get() >= v} boolean lt(Supplier s, def v) {return s.get() < v}gte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.gte) && lt(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.lt)"
}
}
}
The range aggregation's "from/to" uses "gte/lt", so when users use the range slider to filter dashboard results it causes mixed results to show. Is there any setting I can change somewhere to fix this? Or do I need to get crafty with my ranges to make it work with the controls? I can put 0 to 1.99 and 2 to 4.99 etc, but if the range aggregation is designed to work with gte/lt and manually adding an is between filter applies gte/lt; Then why is the controls range slider off in its own little world?
Years of Service Range showing results in both columns due to controls range slider using gte/lte