My synonyms are stored in a database and, when the synonyms are changed in the database, I want to update any values in the index which may be changed as a result of the synonym
I know this is an old thread but as of ES 7.5 they have added a new feature to update synonyms. Have a look at their documentation.
You need to issue a POST api like this
POST /twitter/_reload_search_analyzers
This would reload all the search analyzers, also ensure that the synonym token filter have the updateable
flag set to true
like this "updatedable": true
.
PS: This feature is part of X-Pack and comes under the basic license which is free.