docbrown/lib/tasks/search.rake
Alex 8b51d8e4b8
[deploy] Fix Fastly rake task spec and Travis CI (#7487)
* Try changing exit to next

* Add breaking test

* Fix search.rake

* Remove test failure
2020-04-23 16:06:57 -04:00

21 lines
477 B
Ruby

namespace :search do
desc "set up Elasticsearch indexes"
task setup: :environment do
Search::Cluster.setup_indexes
end
desc "update Elasticsearch index mappings"
task update_mappings: :environment do
Search::Cluster.update_mappings
end
desc "tear down Elasticsearch indexes"
task destroy: :environment do
if Rails.env.production?
puts "Will NOT destroy indexes in production"
next
end
Search::Cluster.delete_indexes
end
end