I’ve implemented a nightly update of the index and this has been working well. However, some synonyms have recently been added via the dashboard; so I amended the nightly update to call
get_synonym() and batch these into the temp index (as per instructions here).
This worked too, but … I don’t necessarily know the objectID of each synonym to pass to
get_synonym(). As synonyms can be created in the dashboard by non-developers, this means that I need to be told a synonym has been added in order to include it in the nightly update.
As an alternative I’m using the results of
search_synonyms() (no object IDs needed), and I cleanup the results returned so that
batch_synonyms() doesn’t throw an exception; but this feels clunky too.
Is there another way of doing this? For example, it would be nice to have a
get_synonyms() method that returns all the synonyms for an index (no object IDs needed), and then I can pass the results straight to
batch_synonyms() to set on the temp index.
Is there a better way of doing this - maybe I’m missing something here?