relates elastic/x-pack-elasticsearch#721 Original commit: elastic/x-pack-elasticsearch@67fdba706c
Original commit: elastic/x-pack-elasticsearch@e54aa1fd0a