Created
May 1, 2024 00:01
-
-
Save adrianvalenz/074bdda571e4f4b70e4eadfa6555e4b5 to your computer and use it in GitHub Desktop.
rake task for Melisearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :search do | |
# bundle exec rake search:index_all --trace | |
task reindex_all: :environment do | |
klasses = [Listing User Post] | |
klasses.each do |klass| | |
klass.reindex! | |
end | |
puts "Reindexed all classes" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment