Skip to content

Commit c72788c

Browse files
committed
MAGE-1153: use existing logic in mergeSettings instead
1 parent d6f0880 commit c72788c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Helper/AlgoliaHelper.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,6 @@ public function setSettings(
241241
$settings = $this->mergeSettings($indexName, $settings, $mergeSettingsFrom);
242242
}
243243

244-
// Removing synonyms from the settings to avoid duplication (synonyms must be managed within the algolia dashboard)
245-
if (isset($settings['synonyms'])) {
246-
unset($settings['synonyms']);
247-
}
248-
249244
$res = $this->getClient()->setSettings($indexName, $settings, $forwardToReplicas);
250245

251246
self::setLastOperationInfo($indexName, $res);
@@ -376,7 +371,7 @@ public function mergeSettings($indexName, $settings, string $mergeSettingsFrom =
376371
} catch (Exception $e) {
377372
}
378373

379-
$removes = ['slaves', 'replicas', 'decompoundedAttributes'];
374+
$removes = ['slaves', 'replicas', 'decompoundedAttributes', 'synonyms'];
380375

381376
if (isset($onlineSettings['mode']) && $onlineSettings['mode'] == 'neuralSearch') {
382377
$removes[] = 'mode';

0 commit comments

Comments
 (0)