Unexpected error handling request. java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on [traceId] in order to load fielddata in memory by uninverting the inverted index

My elastic deployments consist of es-data, ingest & master. These are deployed as deployments in Kubernetes. I have Zipkin which uses elastic and Zipkin log shows the above error:

: Unexpected error handling request.
java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on [traceId] 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.

also saw this warning in the elastic master pod log:
[2022-05-02T17:40:04,721][WARN ][o.e.d.r.a.a.i.RestPutIndexTemplateAction] [JzKVn5L] [types removal] The parameter include_type_name should be explicitly specified in put template requests to prepare for 7.0. In 7.0 include_type_name will default to 'false', and requests are expected to omit the type name in mapping definitions.

My es-master deployment YAML file is:
apiVersion: apps/v1
kind: Deployment
metadata:
name: es-master
labels:
component: Elasticsearch
role: master
spec:
replicas: 3
selector:
matchLabels:
component: Elasticsearch
role: master
template:
metadata:
labels:
component: Elasticsearch
role: master
spec:
initContainers:
- name: init-sysctl
image: docker.io/busybox:1.27.2
command:
- sysctl
- -w
- vm.max_map_count=262144
securityContext:
privileged: true
containers:
- name: es-master
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ES_JAVA_OPTS
value: -Xms3g -Xmx3g
- name: PROCESSORS
valueFrom:
resourceFieldRef:
resource: limits.cpu
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 1
memory: 4Gi
ports:
- containerPort: 9300
name: transport
volumeMounts:
- name: Elasticsearch-config
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml
subPath: Elasticsearch.yml
- name: storage
mountPath: /data/$HOSTNAME
volumes:
- name: Elasticsearch-config
configMap:
name: es-config-master
items:
- key: Elasticsearch.yml
path: Elasticsearch.yml
- name: storage
persistentVolumeClaim:
claimName: task-pv-claim

es-data deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: es-data
labels:
component: Elasticsearch
role: data
spec:
replicas: 5
selector:
matchLabels:
component: Elasticsearch
role: data
template:
metadata:
labels:
component: Elasticsearch
role: data
spec:
initContainers:
- name: init-sysctl
image: docker.io/busybox:1.27.2
command:
- sysctl
- -w
- vm.max_map_count=262144
securityContext:
privileged: true
containers:
- name: es-data
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ES_JAVA_OPTS
value: -Xms3g -Xmx3g
- name: PROCESSORS
valueFrom:
resourceFieldRef:
resource: limits.cpu
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 1
memory: 4Gi
ports:
- containerPort: 9200
name: http
- containerPort: 9300
name: transport
volumeMounts:
- name: storage
mountPath: /data/$HOSTNAME
- name: Elasticsearch-config
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml
subPath: Elasticsearch.yml
volumes:
- name: Elasticsearch-config
configMap:
name: es-config-data
items:
- key: Elasticsearch.yml
path: Elasticsearch.yml
- name: storage
persistentVolumeClaim:
claimName: task-pv-claim

es-ingest deployment file is:
apiVersion: apps/v1
kind: Deployment
metadata:
name: es-ingest
labels:
component: Elasticsearch
role: ingest
spec:
replicas: 2
selector:
matchLabels:
component: Elasticsearch
role: ingest
template:
metadata:
labels:
component: Elasticsearch
role: ingest
spec:
initContainers:
- name: init-sysctl
image: docker.io/busybox:1.27.2
command:
- sysctl
- -w
- vm.max_map_count=262144
securityContext:
privileged: true
containers:
- name: es-ingest
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ES_JAVA_OPTS
value: -Xms3g -Xmx3g
- name: NETWORK_HOST
value: site,lo
- name: PROCESSORS
valueFrom:
resourceFieldRef:
resource: limits.cpu
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 1
memory: 4Gi
ports:
- containerPort: 9200
name: http
- containerPort: 9300
name: transport
volumeMounts:
- name: Elasticsearch-config
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml
subPath: Elasticsearch.yml
- name: storage
mountPath: /data/$HOSTNAME
volumes:
- name: Elasticsearch-config
configMap:
name: es-config-ingest
items:
- key: Elasticsearch.yml
path: Elasticsearch.yml
- name: storage
persistentVolumeClaim:
claimName: task-pv-claim

Please help me out with this issue

Welcome to our community! :smiley:
Please format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you.

Take a look at Removal of mapping types | Elasticsearch Guide [8.1] | Elastic. You will need to figure out what indices are impacted, and then what's indexing into them.

Where is this coming from?

This is coming from Zipkin logs