I wanted to continue this answer when elasticsearch 1.0.0 was released. I am pleased to report that a new functionality has been introduced that implements some protection for the heap called a circuit breaker.
In the current implementation, the circuit breaker tries to predict how much data will be loaded into the field data cache, and if it is more than the limit (80% by default), it will turn off the circuit breaker and kill your request there.
There are two options to install if you want to change them:
indices.fielddata.breaker.limit indices.fielddata.breaker.overhead
Overhead is a constant that is used to estimate how much data will be loaded into the field cache; the default is 1.03.
This is an exciting development for elasticsearch and a feature that I expected to implement in a few months.
This is a pull request if he is interested in how it was created; thanks dakrone for this!
https://github.com/elasticsearch/elasticsearch/pull/4261
Hope this helps, MatthewJ
source share