make it work when elasticsearch is not running.