add rake task for rebuild index
This commit is contained in:
parent
5634e87144
commit
87e2510d02
|
@ -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