add rake task for rebuild index
This commit is contained in:
1 parent
5634e87144
commit
87e2510d02
1 file changed
+11
@@ -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
|
||||
Reference in new issue
Block a user