Skip to main content
This page documents an earlier version of the API client. For the latest version, see Copy or move an index.
Required ACL: addObject Using this method, you can keep your existing service running while data from the old index is added to the new index. Moving doesn’t trigger a complete rebuild of the destination index unless it has replicas. Moving an index is expensive and is rate-limited:
  • If you have more than 100 pending requests, the engine throttles your requests.
  • If you have more than 5,000 pending requests, further requests are ignored.

Analytics

If an index has analytics data, renaming doesn’t erase it but be aware of the consequences:
  • The destination’s analytics keep their original name
  • A new set of analytics is started with the new name.
To access the original analytics in the dashboard’s Analytics menu, first create a new empty index with the original index name.
If your source index doesn’t exist, the move operation is ignored. You can still use waitTask for this job.

Moving indices between apps

To move an index between apps, use the copyIndex method.

Moving from and to replicas

You can move a source index to a destination index that has replicas. The process replaces the destination index with the source index , and copies the source data to its replicas. You can’t move a source index that has replicas.

Examples

Move index

// Use an API key with `addObject` ACL
var client = new SearchClient("YourApplicationID", "YourAPIKey");

// Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
client.MoveIndex("indexNameSrc", "indexNameDest");

// Asynchronous
await client.MoveIndexAsync("indexNameSrc", "indexNameDest");

Parameters

indexNameDest
string
required
Index name of the destination index.
indexNameSrc
string
required
Index name of the index to move.

Response

taskID
integer
The taskID used with the waitTask method.
You can use either the source or destination index to wait on the resulting taskID. In either case, the wait includes the entire copy process.
updatedAt
string
The date, in Unix timestamp format, when the job to copy the index was created.

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
{
  "updatedAt": "2017-12-18T21:22:40.761Z",
  "taskID": 19541511530
}
I