Improved error handling for ElasticSearch and the initial indexer