make it work with the latest elasticsearch