require 'vendor/plugins/thinking-sphinx/recipes/thinking_sphinx'
namespace :deploy do
task :rebuild_index, :roles => :app do
thinking_sphinx.stop
update
thinking_sphinx.index
thinking_sphinx.start
restart
end
end
task :symlink_sphinx_indexes, :roles => [:app] do
run "ln -nfs #{shared_path}/db/sphinx #{current_path}/db/sphinx"
end
task :update_config, :roles => [:app], :except => { :no_release => true } do
thinking_sphinx.configure
end
before 'deploy:finalize_update', :symlink_sphinx_indexes
before 'deploy:finalize_update', :update_config