Commit 08ca230a5caf93bb42f69bbb1a64034136780a9b
1 parent
13fd0f4e
Exists in
master
Improved error message for unsupported versions of Elasticsearch - #1569
Showing
2 changed files
with
7 additions
and
0 deletions
Show diff stats
CHANGELOG.md
lib/searchkick/index_options.rb
... | ... | @@ -7,6 +7,8 @@ module Searchkick |
7 | 7 | end |
8 | 8 | |
9 | 9 | def index_options |
10 | + raise UnsupportedVersionError if below70? | |
11 | + | |
10 | 12 | # mortal symbols are garbage collected in Ruby 2.2+ |
11 | 13 | custom_settings = (options[:settings] || {}).deep_symbolize_keys |
12 | 14 | custom_mappings = (options[:mappings] || {}).deep_symbolize_keys |
... | ... | @@ -548,5 +550,9 @@ module Searchkick |
548 | 550 | def below73? |
549 | 551 | Searchkick.server_below?("7.3.0") |
550 | 552 | end |
553 | + | |
554 | + def below70? | |
555 | + Searchkick.server_below?("7.0.0") | |
556 | + end | |
551 | 557 | end |
552 | 558 | end | ... | ... |