Refresh search analyzer
You can refresh search analyzers in real time using the following API. This requires the Index State Management (ISM) plugin to be installed. For more information, see Installing plugins.
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
:
{
"analyzer": {
"my_synonyms": {
"tokenizer": "whitespace",
"filter": [
"synonym"
]
}
},
"filter": {
"synonym": {
"type": "synonym_graph",
"synonyms_path": "synonyms.txt",
"updateable": true
}
}
}
当前内容版权归 OpenSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 OpenSearch .