IMPORTANT: elasticsearch.js has been replaced by the new Elasticsearch JavaScript client. We strongly advise you to migrate to the new client. To learn more, see the migration guide.
scriptsPainlessExecute
editscriptsPainlessExecute
editclient.scriptsPainlessExecute([params, [callback]])
Check the API Conventions and the elasticsearch docs for more information pertaining to this method.