karmi/tire — Issue #199: Rake task to drop all indexes
Author: GearHead90
Created: 2012-01-12 03:42:01+00:00
State: open

In development environment, I found such issue: when I rake db:create and rake db:seed and then rake db:drop, Elastic will remain all indexes. I made this temporary solution:

namespace :tire do
desc 'Remove all app elastic indexes'
task :drop => :environment do
['articles', 'users'].each do |index_name|
index = Tire::Index.new index_name
index.delete
end
end
end

But it is quite ugly. I think rake task, that drops all application indexes will be rather helpful in this gem.