younifyd
Menu

Create or update a synonym rule

Create or update a synonym rule

PUT/_synonyms/{set_id}/{rule_id}

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Create or update a synonym rule action (under synonyms).
  3. Fill in the fields below, then reference the result from later steps as {{createOrUpdateASynonymRule.response.data}}.

Request

Path parameters

set_idstringrequired

The ID of the synonym set.

rule_idstringrequired

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

Query parameters

refreshboolean

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 body

Enter the body as JSON in the step's Body field.

synonymsanyrequired

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

json
{
  "synonyms": null
}

Response

Returns 200 with an object. Read it in later steps with {{createOrUpdateASynonymRule.response.data.<field>}}.

resultany

The update operation result.

reload_analyzers_detailsany

Updating synonyms in a synonym set can reload the associated analyzers in case refresh is set to true. This information is the analyzers reloading result.

json
{
  "result": null,
  "reload_analyzers_details": null
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Create or update a synonym rule — Elasticsearch — Documentation