meilisearch-java
meilisearch-java copied to clipboard
Make it possible to reset some specific settings via the updateSettings route
Description For example, it is possible to reset the synonyms to it' default value by sending
{
"synonyms": null
}
As the json body of the updateSettings method.
Unfortunately, looking at this code:
https://github.com/meilisearch/meilisearch-java/blob/04244faad4b653fe4cdc5eff871463ce6e8b83bc/src/main/java/com/meilisearch/sdk/Settings.java#L33-L60
It appears that if the user sets synonyms to null it will not be added to the final body send to updateSettings, and thus, it will not reset the synonyms.
Passing null to an index setting will reset it to its default value.
It may not be possible to do it as we cannot know the difference between a field not present or a field set specifically to null. Nonetheless if it is possible, it should be investigated.