From 2798603078eb17a9ab4f31749a352e7645c4beec Mon Sep 17 00:00:00 2001 From: metheglin Date: Wed, 27 Nov 2024 21:42:25 +0900 Subject: [PATCH] Fixed atomic reindex to ensure init when check_settings=true. --- lib/algoliasearch-rails.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/algoliasearch-rails.rb b/lib/algoliasearch-rails.rb index 21ee87f..8037fd0 100644 --- a/lib/algoliasearch-rails.rb +++ b/lib/algoliasearch-rails.rb @@ -499,6 +499,8 @@ def algolia_reindex(batch_size = AlgoliaSearch::IndexSettings::DEFAULT_BATCH_SIZ Algolia::Search::OperationIndexParams.new(operation: Algolia::Search::OperationType::COPY, destination: tmp_index_name, scope: %w[settings synonyms rules]) ).task_id AlgoliaSearch.client.wait_for_task(index_name, task_id) + else + algolia_ensure_init(tmp_options, tmp_settings, master_settings) end algolia_find_in_batches(batch_size) do |group|