wrapper for elasticsearch