From 74af984dcd6bf688309dd1a908f3d4dde58585fb Mon Sep 17 00:00:00 2001 From: Pedro Antunes <47991446+PedroAntunesCosta@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:31:59 -0300 Subject: [PATCH] fix: apply Algolia settings regardless of clear_index value Previously, when clear_index was false, the settings (including attributesForFaceting) from custom_settings in config JSON were not applied, causing index configuration to be lost. This fix ensures set_settings() is called in both branches to maintain consistent index configuration. --- scraper/src/algolia_helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scraper/src/algolia_helper.py b/scraper/src/algolia_helper.py index fc51f22..e67fe04 100644 --- a/scraper/src/algolia_helper.py +++ b/scraper/src/algolia_helper.py @@ -33,6 +33,7 @@ def __init__(self, app_id, api_key, index_name, index_name_tmp, settings, query_ else: """Initialize the tmp-index with an copy of curr index content""" self.algolia_client.copy_index(index_name, index_name_tmp) + self.algolia_index_tmp.set_settings(settings) def add_records(self, records, url, from_sitemap):