Disabling fielddata on the cluster/index level

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

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: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html

Maybe the limiting the field data cache size as mentioned in https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-fielddata.html and using circuit breaker appropriately would help.

Some helpful nuggets: https://www.elastic.co/blog/support-in-the-wild-my-biggest-elasticsearch-problem-at-scale

Hope this helps.

Thanks and Regards,
Yogesh Gaikwad

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