Company
Contact Us

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

POST /<index>/_reload_search_analyzers
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

POST /shakespeare/_reload_search_analyzers

Sample response

{
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "reload_details": [
    {
      "index": "shakespeare",
      "reloaded_analyzers": [
        "analyzers-synonyms-test"
      ],
      "reloaded_node_ids": [
        "opensearch-node1"
      ]
    }
  ]
}
© 2021-2023 Mach5 Software, Inc. All rights reserved

When you visit or interact with our sites, services or tools, we or our authorised service providers may use cookies for storing information to help provide you with a better, faster and safer experience and for marketing purposes.