changed implementation to use elasticsearch.js driver