Change dynamically elasticsearch synonyms

前端 未结 3 1286
谎友^
谎友^ 2020-12-14 03:20

Is it possible to store the synonyms for elasticsearch in the index? Or is it possible to get the synonym list from a database like couchdb? I\'d like to add synonyms dynami

3条回答
  •  情歌与酒
    2020-12-14 04:12

    It isn't too painful in elasticsearch to update the synonym list. It can be done by opening and closing You could have it driven from anywhere, but need some of your own infrastructure. It'd work like this:

    • You want an alias pointing at your current index
    • Sync down a new index file to your servers
    • Create a new index with a custom analyzer that uses the new index
    • Rebuild the content from current index to new index
    • Repoint index alias from current to new index

提交回复
热议问题