After ES 5.0 upgrade we are getting the below error when we do sort in Kibana dashboards.
Error:
Fielddata is disabled on text fields by default. Set fielddata=true on [user_name_terr_grp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [user_name_terr_grp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"dist_qtn_master_data","node":"jUzswJjFQoCnnbb7YPZsxQ","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [user_name_terr_grp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [user_name_terr_grp] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}},"status":400}
at http://100.114.117.169:5601/bundles/kibana.bundle.js?v=14458:26:29888
at Function.Promise.try (http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:75:22353)
at http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:75:21723
at Array.map (native)
at Function.Promise.map (http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:75:21678)
at callResponseHandlers (http://100.114.117.169:5601/bundles/kibana.bundle.js?v=14458:26:29500)
at http://100.114.117.169:5601/bundles/kibana.bundle.js?v=14458:26:18075
at processQueue (http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:38:23621)
at http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:38:23888
at Scope.$eval (http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:39:4619)