compatibility with latest version of elasticsearch js api
Created originally on Bitbucket by tellijo (Joël Matelli)
Was already merged in Bitbucket before import, marked as merged by the import user
The latest version of the javascript API for elasticsearch uses a ES6 promises polyfill instead of bluebird. To keep the compatibility with every version, I changed every call to the bluebird .return() method on the elasticsearch client with a classic .then().