In the console, I can export the configuration for an index in JSON that includes Settings, Rules & Synonyms. This allows me to programmatically re-create an index to maintain our “infrastructure as code.”
This process is straight-forward with settings and rules as they can be easily unmarshaled into Algolia’s search.Settings and search.Rules struct types.
However, I can’t find the corresponding way to unmarshal the list of synonyms output by the configuration settings export.
For now, I’ve created my own custom UnmarshalJSON method for synonyms that evaluates the “SynonymType”.
I’m wondering if I’m missing some other straightforward way of doing this in the Go API.