From 44177fab534f26c0050e5314b0b20c20d81b61c5 Mon Sep 17 00:00:00 2001 From: Kevin Miller Date: Wed, 24 Apr 2019 09:53:38 -0700 Subject: [PATCH] Do not check attributes for disabled indexes If indexing is disabled, do not get all of the changed attributes --- lib/algoliasearch-rails.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/algoliasearch-rails.rb b/lib/algoliasearch-rails.rb index 2f315c7f..818b48cf 100644 --- a/lib/algoliasearch-rails.rb +++ b/lib/algoliasearch-rails.rb @@ -743,6 +743,7 @@ def algolia_must_reindex?(object) return object.send(:algolia_dirty?) if (object.respond_to?(:algolia_dirty?)) # Loop over each index to see if a attribute used in records has changed algolia_configurations.each do |options, settings| + next if algolia_indexing_disabled?(options) next if options[:slave] || options[:replica] return true if algolia_object_id_changed?(object, options) settings.get_attribute_names(object).each do |k|