Create or update a synonym set Added in 8.10.0
Synonyms sets are limited to a maximum of 10,000 synonym rules per set. If you need to manage more synonym rules, you can create multiple synonym sets.
Path parameters
-
The id of the synonyms set to be created or updated
Body Required
synonyms_set object | array[object] Required
The synonym set information to update
PUT
/_synonyms/{id}
curl \
-X PUT http://api.example.com/_synonyms/{id} \
-H "Content-Type: application/json" \
-d '{"synonyms_set":{"id":"string","synonyms":"string"}}'
Request examples
{
"synonyms_set": {
"id": "string",
"synonyms": "string"
}
}
Response examples (200)
{
"result": "created",
"reload_analyzers_details": {
"reload_details": [
{
"index": "string",
"reloaded_analyzers": [
"string"
],
"reloaded_node_ids": [
"string"
]
}
],
"_shards": {
"failed": 42.0,
"successful": 42.0,
"total": 42.0,
"failures": [
{
"index": "string",
"node": "string",
"reason": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
},
"shard": 42.0,
"status": "string"
}
],
"skipped": 42.0
}
}
}