This allows us to change mapping types without having it throw fatal errors on reindexing. This commit can be reverted and have heyday/silverstripe-elastica updated once the upstream PR is merged and tagged.
The reason why the index mappings are persisting across manual CLI calls to delete the index are a mystery to me, but running this procedurally in the same process should avoid the issue anyway.
This allows us to change mapping types without having it throw fatal errors on reindexing. This commit can be reverted and have heyday/silverstripe-elastica updated once the upstream PR is merged and tagged.
Hopefully will help for https://github.com/silverstripe/addons.silverstripe.org/issues/241, but needs to be tested on UAT and prod before we can actually close the issue.
The reason why the index mappings are persisting across manual CLI calls to delete the index are a mystery to me, but running this procedurally in the same process should avoid the issue anyway.