I created a scripted field with lots of if statements, which looks like this:
def status = doc['TTS_Verantwortlicher'].value;
if (status == 2) return 'Kirschner' ;
if (status == 4) return 'Gehr' ;
if (status == 5) return 'Grande' ;
if (status == 8) return 'Scheibli' ;
if (status == 10) return 'Meier' ;
if (status == 11) return 'Scalegno' ;
. . .
if (status == 6972) return 'Jurt' ;
Now I get a compile error of Kibana when I click on the discover tab. Is it because of the many if statements and if yes how can I change it? I can't however add a field or change it, as it has to stay as it is.