I am running elastic stack v 7.2.0 on kubernetes and I am getting this error in the elasticsearh while accessing the metricbeat dashboard
Caused by: java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] 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.
My questions is If I have manually added the template and the dashboards, then why am I getting this error? With the template added should not the required mapping go inside the index? I saw some answers which suggested to apply the required mapping explicitly. But then In this case how should i give the index name on which this mapping is to be applied as my metricbeat index would be created daily with each new date. How this explicit mapping will persist across all the metricbeat indices created with each date? PUT /what-should-be-the-index-name/_mapping