Fielddata disabled error


I was trying to create the script field using the following script for simple concatenation ;
doc['processName'].value + doc['robotName'].value

But I am getting the below error while I go to Discover :
"Fielddata is disabled on text fields by default. Set fielddata=true on [processName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}}]},"status":500

Could you anyone please guide me if I can fix it within Kibana? if so, how to do it.


This doc guide should help you.