Create or update a synonym rule

  • PUT /_synonyms/{set_id}/{rule_id}

Create or update a synonym rule in a synonym set.

If any of the synonym rules included is invalid, the API returns an error.

When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.

  • Cluster privileges: manage_search_synonyms

Query Parameters

refresh boolean · default: true

If true, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning. If false, analyzers will not be reloaded with the new synonym rule

Request

synonyms string required

The synonym rule information definition, which must be in Solr format.

Response