Reload search analyzer

The reload search analyzer API operation detects any changes to synonym files for any configured search analyzers. The reload search analyzer request needs to be run on all nodes. Additionally, the synonym token filter must be set to true.

Path and HTTP methods

  1. POST /<index>/_reload_search_analyzers
  2. GET /<index>/_reload_search_analyzers

Request body fields

Request body parameters are optional.

Field TypeData typeDescription
allow_no_indicesBooleanWhen set to false, an error is returned for indexes that are closed or missing and match any wildcard expression. Default is set to true.
expand_wildcardsStringAllows you to set the wildcards that can be matched to a type of index. Available options are open, closed, all, none, and hidden. Default is set to open.
ignore_unavailableBooleanIf an index is closed or missing, an error is returned when ignore_unavailable is set to false. Default is set to false.

Examples

The following are an example request and response.

Sample request

  1. POST /shakespeare/_reload_search_analyzers

Sample response

  1. {
  2. "_shards": {
  3. "total": 1,
  4. "successful": 1,
  5. "failed": 0
  6. },
  7. "reload_details": [
  8. {
  9. "index": "shakespeare",
  10. "reloaded_analyzers": [
  11. "analyzers-synonyms-test"
  12. ],
  13. "reloaded_node_ids": [
  14. "opensearch-node1"
  15. ]
  16. }
  17. ]
  18. }