lib/searchkick/index_options.rb in searchkick-5.0.3 vs lib/searchkick/index_options.rb in searchkick-5.0.4

- old
+ new

@@ -17,11 +17,11 @@ else settings = generate_settings.deep_symbolize_keys.deep_merge(custom_settings) mappings = generate_mappings.deep_symbolize_keys.deep_merge(custom_mappings) end - set_deep_paging(settings) if options[:deep_paging] + set_deep_paging(settings) if options[:deep_paging] || options[:max_result_window] { settings: settings, mappings: mappings } @@ -523,10 +523,10 @@ end def set_deep_paging(settings) if !settings.dig(:index, :max_result_window) && !settings[:"index.max_result_window"] settings[:index] ||= {} - settings[:index][:max_result_window] = 1_000_000_000 + settings[:index][:max_result_window] = options[:max_result_window] || 1_000_000_000 end end def index_type @index_type ||= begin