Closed c4ndybar closed 2 years ago
This makes sense, but it means that if you remove a setting from the Gatsby settings, it will not be removed (which is why I didn't do this yet before), do you think that's not an issue?
This makes sense, but it means that if you remove a setting from the Gatsby settings, it will not be removed (which is why I didn't do this yet before), do you think that's not an issue?
Good point, I didn't even think of that. I think it's definitely an issue 😅
So the edge case is.
mergeSettings
I'm not sure how frequently this series of events would happen, but it's certainly something that could be called out in documentation for mergeSettings
.
Something like.
When using mergeSettings
, you shouldn't remove any settings as the settings will already exist on the index and be persisted. Instead, you should change the value of the setting here. Another option is to remove the setting here and then manage the setting from Algolia's web interface.
Seems like the best workaround indeed, feel free to add it to the readme like this @c4ndybar
released in 0.24.0, thanks again
Adding
mergeSettings
The
mergeSettings
option will merge whatever settings you have with the existing index settings. The settings defined for the query will take precedence.Why?
This allows you to make index changes using the Algolia web interface and to preserve those changes. Currently, any changes you make through the Algolia web interface are overwritten anytime this plugin runs.