I need implement search by synonyms, now it possible todo by closing index, update index by synonym filter, open index. The probem is that users can update synonym dictanory in any time, and it should not affect system, but when index closed, impossible to search, put in index.
Asked
Active
Viewed 117 times
1 Answers
0
You need to use a synonym file which you can update without having to close/open the index.
The downside is that the synonym file needs to be stored on each node of your cluster and users might not have access to it.
Also after refreshing a file, you need to call POST /<target>/_reload_search_analyzers
in order to pick up changes to synonym files.
There's also a long-standing issue seeking to provide an API for improved synonym management, but it's still in the works.

Val
- 207,596
- 13
- 358
- 360
-
But how user will have possible to change this file at any time? In my case it should be provided though endpoint – stepan Jan 12 '23 at 14:48
-
I think implement my task using closing and opening index, but also need add retry for cases when someone try to use index but index unavailable – stepan Jan 12 '23 at 14:51
-
Right now, those are two only two options you have, so you have to pick either... or none :-) – Val Jan 12 '23 at 15:09
-
Anything else needed? – Val Jan 12 '23 at 19:11