Make indexing error message more actionable and less panic inducing
@@ -209,7 +209,11 @@ class ElasticsearchSyncer:
"""
if not self._consistency_check(write_index, live_alias):
msg = 'Reindexing failed; index {} does not appear to have all ' \
- 'of the documents in the database.'.format(write_index)
+ 'of the documents from Postgres. An operator should ' \
+ 'investigate why the job failed and either manually alias ' \
+ '\'{}\' to point to \'{}\' or rerun the reindex job after ' \
+ 'taking corrective action. The production index has NOT ' \
+ 'been impacted. '.format(write_index, live_alias, write_index)
log.error(msg)
indices = set(self.es.indices.get('*'))
# If the index exists already and it's not an alias, delete it.
