Update to query for ES