Data Defining

I am new to Kibana. I am able to create visualizations but the challenge i am facing is, In the data sets some of the fields values are numeric but in actual the numeric values defines a term, for example in Gender field it has values 0,1 & 2 where 0 means unknown, 1 means male and 2 means female.
So in Kibana if i select the gender field it is displaying the numeric values which i do not what to, I want to display the actual values of the gender.

So can you please help me in a way to create scripted fields or is there any other way to display the values.

Thank you very much.

Right now there isn't a way to define a mapping from a numerical field with a fixed number of values to strings corresponding to those values in Kibana.

The best thing I can think of is to do the mapping as you're indexing the data (presumably in Logstash?) by using something like a "translate" filter: https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html

For a small number of fairly static values this should work well.