Skip to main content
Required ACL: addObject Notes:
  • Existing destination indices are overwritten, except for their analytics data.
  • If the destination index doesn’t exist yet, it’s created.
  • This operation is resource-intensive.
Copy
  • If the source index doesn’t exist, copying creates a new index with 0 records and default settings.
  • API keys from the source index are merged with the existing keys in the destination index.
  • You can’t copy the enableReRanking, mode, and replicas settings.
  • You can’t copy to a destination index that already has replicas.
  • Be aware of the size limits.
  • For more information, see Copy indices.
Move
  • If the source index doesn’t exist, moving is ignored without returning an error.
  • When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name.
  • If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices.
  • For more information, see Move indices.
This operation is subject to indexing rate limits.

Usage

// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));

// Call the API
var response = await client.OperationIndexAsync(
  "<SOURCE_INDEX_NAME>",
  new OperationIndexParams
  {
    Operation = Enum.Parse<OperationType>("Move"),
    Destination = "<DESTINATION_INDEX_NAME>",
    Scope = new List<ScopeType>
    {
      Enum.Parse<ScopeType>("Rules"),
      Enum.Parse<ScopeType>("Settings"),
    },
  }
);

// print the response
Console.WriteLine(response);
// Initialize the client
final client =
    SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');

// Call the API
final response = await client.operationIndex(
  indexName: "<SOURCE_INDEX_NAME>",
  operationIndexParams: OperationIndexParams(
    operation: OperationType.fromJson("move"),
    destination: "<DESTINATION_INDEX_NAME>",
    scope: [
      ScopeType.fromJson("rules"),
      ScopeType.fromJson("settings"),
    ],
  ),
);

// print the response
print(response);
// Initialize the client
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
  // The client can fail to initialize if you pass an invalid parameter.
  panic(err)
}

// Call the API
response, err := client.OperationIndex(client.NewApiOperationIndexRequest(
  "<SOURCE_INDEX_NAME>",
  search.NewEmptyOperationIndexParams().SetOperation(search.OperationType("move")).SetDestination("<DESTINATION_INDEX_NAME>").SetScope(
    []search.ScopeType{search.ScopeType("rules"), search.ScopeType("settings")})))
if err != nil {
  // handle the eventual error
  panic(err)
}


// print the response
print(response)
// Initialize the client
SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");

// Call the API
UpdatedAtResponse response = client.operationIndex(
  "<SOURCE_INDEX_NAME>",
  new OperationIndexParams()
    .setOperation(OperationType.MOVE)
    .setDestination("<DESTINATION_INDEX_NAME>")
    .setScope(Arrays.asList(ScopeType.RULES, ScopeType.SETTINGS))
);

// print the response
System.out.println(response);
// Initialize the client
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');

// Call the API
const response = await client.operationIndex({
  indexName: '<SOURCE_INDEX_NAME>',
  operationIndexParams: { operation: 'move', destination: '<DESTINATION_INDEX_NAME>', scope: ['rules', 'settings'] },
});


// print the response
console.log(response);
// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")

// Call the API
var response =
  client.operationIndex(
    indexName = "<SOURCE_INDEX_NAME>",
    operationIndexParams =
      OperationIndexParams(
        operation = OperationType.entries.first { it.value == "move" },
        destination = "<DESTINATION_INDEX_NAME>",
        scope =
          listOf(
            ScopeType.entries.first { it.value == "rules" },
            ScopeType.entries.first { it.value == "settings" },
          ),
      ),
  )


// print the response
println(response)
// Initialize the client
$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');

// Call the API
$response = $client->operationIndex(
    '<SOURCE_INDEX_NAME>',
    ['operation' => 'move',
        'destination' => '<DESTINATION_INDEX_NAME>',
        'scope' => [
            'rules',

            'settings',
        ],
    ],
);


// print the response
var_dump($response);
# Initialize the client
# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.
client = SearchClientSync("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")

# Call the API
response = client.operation_index(
    index_name="<SOURCE_INDEX_NAME>",
    operation_index_params={
        "operation": "move",
        "destination": "<DESTINATION_INDEX_NAME>",
        "scope": [
            "rules",
            "settings",
        ],
    },
)


# print the response
print(response)
# Initialize the client
client = Algolia::SearchClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")

# Call the API
response = client.operation_index(
  "<SOURCE_INDEX_NAME>",
  Algolia::Search::OperationIndexParams.new(
    operation: "move",
    destination: "<DESTINATION_INDEX_NAME>",
    scope: ["rules", "settings"]
  )
)


# print the response
puts(response)
// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")

// Call the API
val response = Await.result(
  client.operationIndex(
    indexName = "<SOURCE_INDEX_NAME>",
    operationIndexParams = OperationIndexParams(
      operation = OperationType.withName("move"),
      destination = "<DESTINATION_INDEX_NAME>",
      scope = Some(Seq(ScopeType.withName("rules"), ScopeType.withName("settings")))
    )
  ),
  Duration(100, "sec")
)

// print the response
println(response)
// Initialize the client
let client = try SearchClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY")

// Call the API
let response = try await client.operationIndex(
    indexName: "<SOURCE_INDEX_NAME>",
    operationIndexParams: OperationIndexParams(
        operation: OperationType.move,
        destination: "<DESTINATION_INDEX_NAME>",
        scope: [ScopeType.rules, ScopeType.settings]
    )
)

// print the response
print(response)

See the full API reference

For more details about input parameters and response fields.
Last modified on April 30, 2026