Type to search.

Create or update a synonym rule

Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 8.10 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

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
reload_analyzers_details object required

Updating synonyms in a synonym set reloads the associated analyzers. This information is the analyzers reloading result.

reload_details object[] required
index string required
reloaded_analyzers string[] required
reloaded_node_ids string[] required
_shards object required
failed number required

The number of shards the operation or search attempted to run on but failed.

successful number required

The number of shards the operation or search succeeded on.

total number required

The number of shards the operation or search will run on overall.

skipped number