Get synonyms setedit

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

Retrieves a synonyms set.

Requestedit

GET _synonyms/<synonyms_set>

Prerequisitesedit

Requires the manage_search_synonyms cluster privilege.

Path parametersedit

<synonyms_set>
(Required, string) Synonyms set identifier to retrieve.

Query parametersedit

from
(Optional, integer) Starting offset for synonyms rules to retrieve. Defaults to 0.
size
(Optional, integer) Specifies the maximum number of synonyms rules to retrieve. Defaults to 10.

Response codesedit

400
The synonyms_set identifier was not provided.
404 (Missing resources)
No synonyms set with the identifier synonyms_set was found.

Examplesedit

The following example retrieves a synonyms set called my-synonyms-set:

GET _synonyms/my-synonyms-set

The synonyms set information returned will include the total number of synonyms rules that the synonyms set contains, and the synonyms rules according to the from and size parameters.

A sample response:

{
  "count": 3,
  "synonyms_set": [
    {
      "id": "test-1",
      "synonyms": "hello, hi"
    },
    {
      "id": "test-2",
      "synonyms": "bye, goodbye"
    },
    {
      "id": "test-3",
      "synonyms": "test => check"
    }
  ]
}