Field dataedit

The field data cache is used mainly when sorting on or faceting on a field. It loads all the field values to memory in order to provide fast document based access to those values. The field data cache can be expensive to build for a field, so its recommended to have enough memory to allocate it, and to keep it loaded.

The amount of memory used for the field data cache can be controlled using indices.fielddata.cache.size. Note: reloading the field data which does not fit into your cache will be expensive and perform poorly.

Setting Description


The max size of the field data cache, eg 30% of node heap space, or an absolute value, eg 12GB. Defaults to unbounded.


A time based setting that expires field data after a certain time of inactivity. Defaults to -1. For example, can be set to 5m for a 5 minute expiry.

Circuit Breakeredit


Added in 1.4.0.Beta1.

Prior to 1.4.0 there was only a single circuit breaker for fielddata.

Elasticsearch contains multiple circuit breakers used to prevent operations from causing an OutOfMemoryError. Each breaker specifies a limit for how much memory it can use. Additionally, there is a parent-level breaker that specifies the total amount of memory that can be used across all breakers.

The parent-level breaker can be configured with the following setting:
Starting limit for overall parent breaker, defaults to 70% of JVM heap

All circuit breaker settings can be changed dynamically using the cluster update settings API.

Field data circuit breakeredit

The field data circuit breaker allows Elasticsearch to estimate the amount of memory a field will require to be loaded into memory. It can then prevent the field data loading by raising an exception. By default the limit is configured to 60% of the maximum JVM heap. It can be configured with the following parameters:

Limit for fielddata breaker, defaults to 60% of JVM heap
A constant that all field data estimations are multiplied with to determine a final estimation. Defaults to 1.03
[1.4.0.Beta1] Deprecated in 1.4.0.Beta1. Replaced by indices.breaker.fielddata.limit.
[1.4.0.Beta1] Deprecated in 1.4.0.Beta1. Replaced by indices.breaker.fielddata.overhead.

Request circuit breakeredit


Added in 1.4.0.Beta1.

The request circuit breaker allows Elasticsearch to prevent per-request data structures (for example, memory used for calculating aggregations during a request) from exceeding a certain amount of memory.

Limit for request breaker, defaults to 40% of JVM heap
A constant that all request estimations are multiplied with to determine a final estimation. Defaults to 1

Monitoring field dataedit

You can monitor memory usage for field data as well as the field data circuit breaker using Nodes Stats API