Commit 26a57398f6f13d72eafa3f1da1c7f4921d243c7d
1 parent
1a114cf2
Exists in
master
and in
21 other branches
Raise errors on index creation
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/reindex.rb
... | ... | @@ -7,7 +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 | - index.create searchkick_index_options | |
10 | + success = index.create searchkick_index_options | |
11 | + raise index.response.to_s if !success | |
11 | 12 | |
12 | 13 | # use scope for import |
13 | 14 | scope = respond_to?(:search_import) ? search_import : self | ... | ... |