Commit d4ee48c86b3ec564bed68d0c9676b21186bfca98

Authored by Andrew Kane
1 parent e038c3b7

Clean indices before reindex

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
lib/searchkick/reindex.rb
... ... @@ -7,6 +7,8 @@ module Searchkick
7 7 new_index = alias_name + "_" + Time.now.strftime("%Y%m%d%H%M%S")
8 8 index = Tire::Index.new(new_index)
9 9  
  10 + clean_indices
  11 +
10 12 success = index.create searchkick_index_options
11 13 raise index.response.to_s if !success
12 14  
... ...