Create or update a synonym rule

Auth

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.

Required privileges

Cluster privileges manage_search_synonyms

Path parameters

set_id string required

The ID of the synonym set.

rule_id string required

The ID of the synonym rule to be updated or created.

Request body

synonyms string required

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

Response

application/json
result enum required

The update operation result.

Values: created updated deleted not_found noop