Required API Key: any key with the editSettings ACL

Method signature
suspend fun Index.copyRules(
    destination: IndexName,
    requestOptions: RequestOptions? = null
): RevisionIndex

About this method # A

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

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

Examples # A

Copy rules#

1
index.copyRules(indexName)

Parameters # A

indexNameSrc #
type: string
Required

Name of the source index to copy.

indexNameDest #
type: string
Required

Name of the destination index.

Response # A

This method doesn't return a response.

Did you find this page helpful?