added warning and error messaging back in to elasticsearch queries