Skip to content

Commit d6f0880

Browse files
committed
MAGE-1153: fix synonyms duplication after PHP v4 upgrade
1 parent 3a3e823 commit d6f0880

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Helper/AlgoliaHelper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ 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+
244249
$res = $this->getClient()->setSettings($indexName, $settings, $forwardToReplicas);
245250

246251
self::setLastOperationInfo($indexName, $res);

0 commit comments

Comments
 (0)