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

I think it might be an issue with the index mapping recently I have setup a lifecycle policy for the metricbeat index as it has like one month hot phase by default. I set it to one week and then applied delete phase to the policy. After this the index got messed up showing this error. Not sure what to do here because even after deleting the exxisting index the newly formed index is also giving the same error