I don’t think that’s going to work, for a couple of reasons. First, we’re going to want to run this to rebuild the search index in preview, and the preview environment claims to be `production`. Second, there will be times (albeit rarely) when we want to run this in production and rebuild the search index from the source apps.

Just to clarify what “effectively clear out the index” means: the index will still be there, but nothing will be pointing to it, so it would still be possible to get the index back by going into elasticsearch and manually futzing with the aliases. At least until we have a Rake task to roll back to a previous index or to switch manually to a named index.