add rake task for rebuild index

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-09-24 18:46:38 +08:00
1 parent 5634e87144
commit 87e2510d02
1 file changed
+11
+11
View File
@@ -0,0 +1,11 @@
# encoding: utf-8
namespace :index do
task :rebuild => :environment do
Sunspot.remove_all!
Sunspot.commit
Sunspot.index NewsBulletin.all
Sunspot.index Bulletin.all
Sunspot.commit
end
end