IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Delete synonym rule
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Delete synonym rule
editDeletes an individual synonym rule from a synonyms set.
Request
editDELETE _synonyms/<synonyms_set>/<synonym_rule>
Prerequisites
editRequires the manage_search_synonyms
cluster privilege.
Path parameters
edit-
<synonyms_set>
- (Required, string) Synonyms set identifier to update.
-
<synonym_rule>
- (Required, string) Synonym rule identifier to delete.
Response codes
edit-
404
(Missing resources) -
The
synonyms_set
identifier was not found, or the synonym rule specified bysynonym_rule
was not found in the synonyms set.
Examples
editThe following example deletes an existing synonym rule called test-1
for the synonyms set my-synonyms-set
:
response = client.synonyms.delete_synonym_rule( set_id: 'my-synonyms-set', rule_id: 'test-1' ) puts response
DELETE _synonyms/my-synonyms-set/test-1
{ "result": "deleted", "reload_analyzers_details": { "_shards": { "total": 2, "successful": 1, "failed": 0 }, "reload_details": [ { "index": "test-index", "reloaded_analyzers": [ "my_search_analyzer" ], "reloaded_node_ids": [ "1wYFZzq8Sxeu_Jvt9mlbkg" ] } ] } }
All analyzers using this synonyms set will be reloaded automatically to reflect the rule being deleted.
Was this helpful?
Thank you for your feedback.