All you need to know about Elasticsearch 5.0: Scripting
Elasticsearch has known ups and downs with it's support of scripting languages. Two versions ago (that is, in the 1.x series) it added and removed support of various scripting languages in almost every minor release. I have also recommended avoiding the use of them myself for some specified reasons....