Copy settings
editSettings
ACL
$client->copySettings( string indexNameSrc, string indexNameDest );
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
You’re currently reading the JavaScript API client v4 documentation. Check the migration guide to learn how to upgrade from v3 to v4. You can still access the v3 documentation.
You’re currently reading the Ruby API client v2 documentation. Check the migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
About this method
Copy the settings of an index to another index on the same app.
The copySettings
method removes all current settings of the destination index,
and replaces them with the settings from the source index.
If the destination index doesn’t exist, the copySettings
method creates it.
In that case, the new index has the settings of the source index, but not the records, Rules, or synonyms.
This method does not copy the enableReRanking
and mode
settings.
To copy more than settings, use the copyIndex
method with the appropriate scope
parameter.
Examples
Read the Algolia CLI documentation for more information.
Copy settings
1
$client->copySettings('indexNameSrc', 'indexNameDest');
Parameters
Parameter | Description |
---|---|
indexNameSrc
|
type: string
Required
Name of the source index to copy. |
indexNameDest
|
type: string
Required
Name of the destination index. |
Response
This method doesn't return a response.