mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-03-04 02:09:44 +00:00
* Add analyzer documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add index and search analyzer pages Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Doc review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * More doc review comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Implemented editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update index-analyzers.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
41 lines
867 B
Markdown
41 lines
867 B
Markdown
---
|
|
layout: default
|
|
title: Refresh search analyzer
|
|
nav_order: 50
|
|
has_toc: false
|
|
redirect_from:
|
|
- /query-dsl/analyzers/refresh-analyzer/
|
|
- /im-plugin/refresh-analyzer/index/
|
|
---
|
|
|
|
# Refresh search analyzer
|
|
|
|
With ISM installed, you can refresh search analyzers in real time with the following API:
|
|
|
|
```json
|
|
POST /_plugins/_refresh_search_analyzers/<index or alias or wildcard>
|
|
```
|
|
For example, if you change the synonym list in your analyzer, the change takes effect without you needing to close and reopen the index.
|
|
|
|
To work, the token filter must have an `updateable` flag of `true`:
|
|
|
|
```json
|
|
{
|
|
"analyzer": {
|
|
"my_synonyms": {
|
|
"tokenizer": "whitespace",
|
|
"filter": [
|
|
"synonym"
|
|
]
|
|
}
|
|
},
|
|
"filter": {
|
|
"synonym": {
|
|
"type": "synonym_graph",
|
|
"synonyms_path": "synonyms.txt",
|
|
"updateable": true
|
|
}
|
|
}
|
|
}
|
|
```
|