How to dynamically change synonyms for ElasticSearch

后端 未结 5 1402
执念已碎
执念已碎 2021-02-06 05:22

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

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-06 05:49

    There is a project for reloading the synonym file lindstromhenrik/elasticsearch-analysis-file-watcher-synonym Although I don't know if it works in the latest versions. Maybe you can start by using the plugin and expanding synonyms at query time, since at query time you will have all the synonyms updated instead of reindexing documents that you guess that should be updated because of changes in the synonyms file.

提交回复
热议问题