encapsulate elasticsearch specific query within the driver.