stepan
stepan

Reputation: 1

How implement updating index by synonyms without closing index?

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.

Upvotes: 0

Views: 285

Answers (1)

Val
Val

Reputation: 217344

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.

Upvotes: 0

Related Questions