add clean es functionality and update simple es query