https://github.com/elasticsearch/elasticsearch/issues/5151
https://github.com/elasticsearch/elasticsearch/pull/6829