Commit 88b0957cc6ff2f5d5c6bb1e24a28f8ced086ff63
1 parent
cedd1b1a
Exists in
master
and in
21 other branches
Less output
Showing
1 changed file
with
0 additions
and
4 deletions
Show diff stats
lib/searchkick/reindex.rb
... | ... | @@ -15,7 +15,6 @@ module Searchkick |
15 | 15 | end |
16 | 16 | |
17 | 17 | if a = Tire::Alias.find(alias_name) |
18 | - puts "[IMPORT] Alias found: #{Tire::Alias.find(alias_name).indices.to_ary.join(",")}" | |
19 | 18 | old_indices = Tire::Alias.find(alias_name).indices |
20 | 19 | old_indices.each do |index| |
21 | 20 | a.indices.delete index |
... | ... | @@ -25,18 +24,15 @@ module Searchkick |
25 | 24 | a.save |
26 | 25 | |
27 | 26 | old_indices.each do |index| |
28 | - puts "[IMPORT] Deleting index: #{index}" | |
29 | 27 | i = Tire::Index.new(index) |
30 | 28 | i.delete if i.exists? |
31 | 29 | end |
32 | 30 | else |
33 | - puts "[IMPORT] No alias found. Deleting index, creating new one, and setting up alias" | |
34 | 31 | i = Tire::Index.new(alias_name) |
35 | 32 | i.delete if i.exists? |
36 | 33 | Tire::Alias.create(name: alias_name, indices: [new_index]) |
37 | 34 | end |
38 | 35 | |
39 | - puts "[IMPORT] Saved alias #{alias_name} pointing to #{new_index}" | |
40 | 36 | true |
41 | 37 | end |
42 | 38 | ... | ... |