# Set fielddata=true error

**URL:** https://discuss.elastic.co/t/set-fielddata-true-error/76376
**Category:** Kibana
**Created:** [February 24, 2017, 9:44am UTC](https://discuss.elastic.co/t/set-fielddata-true-error/76376 "2017-02-24T09:44:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Akhilesh\_Anb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhilesh_anb/32/4343_2.png) [@Akhilesh\_Anb](https://discuss.elastic.co/u/Akhilesh_Anb)
#### Post date: [February 24, 2017, 9:44am UTC](https://discuss.elastic.co/t/set-fielddata-true-error/76376/1 "2017-02-24T09:44:16Z")

</div>

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](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](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](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](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](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](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](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](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](http://100.114.117.169:5601/bundles/commons.bundle.js?v=14458:39:4619))

---

<div class="post-metadata">

### Author: ![lueneburger](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lueneburger](https://discuss.elastic.co/u/lueneburger)
#### Post date: [February 24, 2017, 10:52am UTC](https://discuss.elastic.co/t/set-fielddata-true-error/76376/2 "2017-02-24T10:52:45Z")

</div>

take a look [here](http://stackoverflow.com/a/38156296)  
there someone got the same question and below you see the answer and how you can enable fielddata

But read this too [here](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/fielddata.html), for the keyword type, that wont increase the memory usage like fielddata

hope that helps 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 24, 2017, 10:53am UTC](https://discuss.elastic.co/t/set-fielddata-true-error/76376/3 "2017-03-24T10:53:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
