diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index ba57aec..1d5ddcb 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -7,11 +7,6 @@ module Searchkick end def index_options - if below70 - index_type = options[:_type] - index_type = index_type.call if index_type.respond_to?(:call) - end - custom_mapping = options[:mappings] || {} if below70 && custom_mapping.keys.map(&:to_sym).include?(:properties) # add type @@ -504,6 +499,14 @@ module Searchkick end end + def index_type + @index_type ||= begin + index_type = options[:_type] + index_type = index_type.call if index_type.respond_to?(:call) + index_type + end + end + def default_type "text" end -- libgit2 0.21.0