API Reference / API Methods / Synonyms / Copy synonyms

Copy Synonyms

Required API Key: any key with the synonyms ACL
Method signature
$client->copySynonyms(string indexNameSrc, string indexNameDest);

About this method

You are currently reading the documentation of the JavaScript API Client v4. Read our migration guide to learn how to upgrade from v3 to v4. You can still access the v3 documentation.

Copy the synonyms of an index to another index on the same app.

Note that this removes all synonyms currently present in the destination index, and replaces them with the synonyms from the source.

Examples

Copy synonyms

1
$client->copySynonyms('indexNameSrc', 'indexNameDest');

Parameters

indexNameSrc
type: string
Required

Name of the source index to copy.

indexNameDest
type: string
Required

Name of the destination index.

Response

No response

Did you find this page helpful?