Skip to content

Commit

Permalink
get rid of unneeded search:create_indexes command
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbalbert committed Oct 4, 2017
1 parent f41659a commit e2fecff
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/tasks/search.rake
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
namespace :search do
desc "Create emtpy search indexes"
task create_indexes: :environment do
[Post, DiscussionThread, Subforum, User].each do |klass|
klass.__elasticsearch__.client.indices.create \
index: klass.index_name,
body: { settings: klass.settings.to_hash, mappings: klass.mappings.to_hash }
end
end

desc "Rebuild search indexes from scratch for all search enabled models"
task rebuild: :environment do
[Post, DiscussionThread, Subforum, User].each(&:reset_search_index!)
Expand Down

0 comments on commit e2fecff

Please sign in to comment.