Auto replacement, bind numbers to words

I have field "severity" where my "values" are: 10,20,30,40,50,60,70,80,90.100 where
10 - NO IMPACT
20,30 - LOW
40,50,60 - MEDIUM
80,90,100 - HIGH

How to build search that will make auto replacement numbers to words?

As I understand it is impossible to do via Kibana? Yes?

So you want to query for something like HIGH and get any values that are 89, 90, 100?

If so, you could do this using scripted fields in Kibana. You could set up a script that returns your desired string based on the severity number value, and instead of querying the severity directly, you can simply query your scripted field.

Some pseudocode:

def sev = doc['severity'].value;
if (sev <= 10) {
   return "NO IMPACT"
} else {
   return "whatever"
}
// etc

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