alphagov / trade-tariff-backend

Enabling the population and distribution via API of UK Customs tariffs and duties
MIT License
7 stars 6 forks source link

Remove the elasticsearch plugin on models that are inherited from GoodsNomenclature #153

Closed matthewford closed 10 years ago

matthewford commented 10 years ago

There is an issue when you try and recreate your DB from scratch where delete calls will be made to documents not in ES that will cause the whole sync process to crash. This is because this plugin uses the after_destroy callback.

This removes the sequel plugin from models which are already indexed as part of the sync process TradeTariffBackend.reindex.

matthewford commented 10 years ago

Will rework specs to manually reindex on each one.

matthewford commented 10 years ago

Closing this for now, perhaps a better way would be to just change the setup instructions to do a one off manual index before sync.