-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add documentation about reloading search analyzers #42865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| [[indices-reload-analyzers]] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be marked as experimental. |
||
| == Reload Search Analyzers | ||
|
|
||
| Reloads search analyzers and its resources. | ||
|
|
||
| The `_reload_search_analyzers` API can be run on one more indices and will | ||
| reload all search analyzers that contain components that were marked as | ||
| updateable when they were created, such as | ||
| <<synonym token filters,analysis-synonym-tokenfilter>>: | ||
|
|
||
| [source,js] | ||
| -------------------------------------------------- | ||
| PUT /test_index | ||
| { | ||
| "settings": { | ||
| "index" : { | ||
| "analysis" : { | ||
| "analyzer" : { | ||
| "synonym" : { | ||
| "tokenizer" : "whitespace", | ||
| "filter" : ["synonym"] | ||
| } | ||
| }, | ||
| "filter" : { | ||
| "synonym" : { | ||
| "type" : "synonym", | ||
| "synonyms_path" : "analysis/synonym.txt", | ||
| "updateable" : true <1> | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "mappings": { | ||
| "properties": { | ||
| "text": { | ||
| "type": "text", | ||
| "search_analyzer": "synonym" <2> | ||
| } | ||
| } | ||
| } | ||
| } | ||
| -------------------------------------------------- | ||
| // CONSOLE | ||
|
|
||
| <1> Mark the synonym filter as updateable. | ||
| <2> Synonym filter is usable as a search_analyzer. | ||
|
|
||
| Calling the `_reload_search_analyzers` endpoint will now trigger reloading the | ||
| synonyms from the configured "synonym.txt" file. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a NOTE regarding the fact that the reload is per node so you need to update your |
||
|
|
||
| [source,js] | ||
| -------------------------------------------------- | ||
| POST /test_index/_reload_search_analyzers | ||
| -------------------------------------------------- | ||
| // CONSOLE | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract the last sentence in a NOTE in order to make sure that users are aware of the limitation.