How to set the synonym by using dynamic settings?

my synonym configure is in one file, and the file path is configured in the elasticsearch.yml,
i now want to change the settings in the synonym file. how to do it?

can anyone give me an example?

i cant find any way from the url above.

You need to update the mapping/template. However it won't apply to documents already indexed.