# Disabling fielddata on the cluster/index level

**URL:** https://discuss.elastic.co/t/disabling-fielddata-on-the-cluster-index-level/205411
**Category:** Elasticsearch
**Created:** [October 28, 2019, 6:40am UTC](https://discuss.elastic.co/t/disabling-fielddata-on-the-cluster-index-level/205411 "2019-10-28T06:40:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![doron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doron/32/57422_2.png) [@doron](https://discuss.elastic.co/u/doron)
#### Post date: [October 28, 2019, 6:40am UTC](https://discuss.elastic.co/t/disabling-fielddata-on-the-cluster-index-level/205411/1 "2019-10-28T06:40:34Z")

</div>

I've suddenly noticed that fielddata cache for the **\_id** field is taking 14GB of RAM on my cluster, and I'm not sure where that came from (probably some query I'm not aware of). I've cleared it manually, but I'm worried it might return. Is there a way to disable fielddata cache for the entire index, or even better - the entire cluster?  
(I'm using ES 6.6)

Thanks

---

<div class="post-metadata">

### Author: ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)
#### Post date: [October 28, 2019, 7:38am UTC](https://discuss.elastic.co/t/disabling-fielddata-on-the-cluster-index-level/205411/2 "2019-10-28T07:38:53Z")

</div>

Hi @doron,

Looks like some query might have caused it, though we do not recommend using `_id` for sorting, aggregations etc.  
In case you do want to use it then it is recommended to duplicate into another field.

> it is advised to duplicate the content of the `_id` field in another field that has `doc_values` enabled.

Refer: [\_id field | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html)

Maybe the limiting the field data cache size as mentioned in [Field data cache settings | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-fielddata.html) and using circuit breaker appropriately would help.

Some helpful nuggets: [Support in the Wild: My Biggest Elasticsearch Problem at Scale | Elastic Blog](https://www.elastic.co/blog/support-in-the-wild-my-biggest-elasticsearch-problem-at-scale)

Hope this helps.

Thanks and Regards,  
Yogesh Gaikwad

---

<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: [November 25, 2019, 7:38am UTC](https://discuss.elastic.co/t/disabling-fielddata-on-the-cluster-index-level/205411/3 "2019-11-25T07:38:54Z")

</div>

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