Commit d4ee48c86b3ec564bed68d0c9676b21186bfca98
1 parent
e038c3b7
Exists in
master
and in
21 other branches
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,6 +7,8 @@ module Searchkick | ||
7 | new_index = alias_name + "_" + Time.now.strftime("%Y%m%d%H%M%S") | 7 | new_index = alias_name + "_" + Time.now.strftime("%Y%m%d%H%M%S") |
8 | index = Tire::Index.new(new_index) | 8 | index = Tire::Index.new(new_index) |
9 | 9 | ||
10 | + clean_indices | ||
11 | + | ||
10 | success = index.create searchkick_index_options | 12 | success = index.create searchkick_index_options |
11 | raise index.response.to_s if !success | 13 | raise index.response.to_s if !success |
12 | 14 |