changed to use official elasticsearch-js