handling elasticsearch data