Link Search Menu Expand Document Documentation Menu

You're viewing version 3.7 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

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
    }
  }
}

Query parameters

The following table lists the supported query parameters.

Parameter Data type Description
reload_cached_resources Boolean When set to true, reloads cached resources from disk without rebuilding caches for token filters that load files from disk (for example, the hunspell filter’s dictionary files). When false (the default), analyzer factories are rebuilt but cached resources are reused.
350 characters left

Have a question? .

Want to contribute? or .