> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Move index

> Move or rename an index.

export const Legacy = ({title, href}) => {
  return <Note>

    This page documents an earlier version of the API client.
    For the latest version, see <a href={href}>{title}</a>.

    </Note>;
};

export const serviceLimits = {
  application: {
    applicationSize: "100 GB (or 1 GB for the Build plan)",
    indexSize: "100 GB (or 1 GB for the Build plan)",
    indexingOperations: "Depends on your plan and usage.",
    indexingRate: "10,000 indexing operations per Unit (as applicable)",
    indexingRequestBodySize: "1 GB per batch",
    indicesPerApplication: "1,000 (Premium), 50 (Grow), or 10 (Build)",
    customNormalizations: "10",
    pendingRequests: "5,000",
    recordSize: "10 KB to 100 KB—based on your plan (10 KB maximum for the Build plan)",
    searchRequestBodySize: "50 MB per request",
    sortCriterionLength: "First 50 bytes (50 characters for ASCII text)",
    synonymsPerIndex: "10,000 (or 1,000 for the Build plan)",
    throttlingLimit: "100 pending requests",
    virtualReplicasPerIndex: "20"
  },
  filtersFacetsRules: {
    conditionsPerRule: "25",
    filterScore: "65,535",
    maxRatioFacetValuePairs: "0.1",
    numberOfFilters: "1,000",
    promotedItemsPerGroup: "100",
    promotedItemsPerRule: "300",
    ruleConsequenceSize: "100 KiB",
    queryParameterSize: "16 KiB",
    valuesPerFacetPerQuery: "1,000",
    reorderedFacetsPerQuery: "20",
    reorderedFacetValuesPerQuery: "20",
    precomputedFacetOrderingQueries: "100,000"
  },
  searchUI: {
    pagination: "20,000",
    querySuggestions: "100",
    querySize: "512 bytes"
  },
  insightsAnalytics: {
    analyticsApiCalls: "100 API calls per minute per app",
    tagSize: "100 characters",
    tagsProcessedPerIndex: "1,750 unique tag combinations every 5 minutes",
    topSearches: "1,000"
  },
  security: {
    apiKeys: "5,000"
  },
  connectors: {
    authenticationsPerApp: "200",
    sourcesPerApp: "100",
    destinationsPerApp: "500",
    tasksPerSource: "10",
    pushPayloadSize: "5 MB per API call",
    pushWatchDuration: "3 minutes",
    jsonFileSize: "1 GB",
    jsonFileRows: "1,000,000",
    csvFileSize: "1 GB",
    csvFileRows: "1,000,000",
    pushEndpointRate: "2000 calls per minute per IP",
    observabilityRate: "2000 calls per minute per IP",
    runTaskRate: "10 calls per 10 minute per taskID",
    otherEndpointsRate: "200 calls per minute per IP"
  },
  dataTransformation: {
    codeSize: "32 kB",
    runtime: "1 second per transformation",
    memory: "100 kB per request",
    transformationsPerApplication: "5 million per month",
    fetchEnrichmentRequests: "Up to 1 million Fetch requests per Application per month, as part the 5 million transformations per Application per month limit.",
    fetchTimeout: "30 seconds per Record",
    fetchResponseSize: "128 kB"
  },
  collections: {
    collectionsPerIndex: "500 (Premium plan) or 1,000 (Elevate plan)",
    conditionsPerCollection: "50",
    manuallySelectedItemsPerCollection: "10,000",
    objectIdSize: "200 characters"
  },
  smartGroups: {
    groupsPerCuratedQuery: "3",
    recordsPerGroup: "50",
    highestStartPosition: "100",
    compositionsPerApplication: "100",
    compositionRulesPerComposition: "200",
    disjunctiveFacetsPerRequest: "20",
    hitsPerPage: "1000"
  },
  docSearch: {
    applicationSize: "25 GB",
    indexSize: "25 GB",
    recordSize: "100 kB",
    indicesPerApplication: "20",
    queriesPerSecond: "3",
    teamMembers: "10"
  },
  generativeGuides: {
    guidesPerIndex: "1,000",
    sizePerGuide: "100 kB",
    inputTokensPerGeneration: "50,000",
    outputTokensPerGeneration: "2,000"
  },
  agentStudio: {
    conversationsRetained: "100,000",
    completionsPerMinute: "3,000",
    retentionPolicy: "90 days",
    agentsPerApp: "500"
  }
};

<Legacy title="Copy or move an index" href="/doc/libraries/sdk/methods/search/operation-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](https://support.algolia.com/hc/en-us/articles/4406975251089#when-do-we-trigger-the-rate-limit):**

* If you have more than {serviceLimits.application.throttlingLimit}, the engine throttles your requests.
* If you have more than {serviceLimits.application.pendingRequests} pending requests, further requests are ignored.

### Analytics

If an index has analytics data, renaming doesn't erase it but [be aware of the consequences](https://beta.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics):

* 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.**

<Info>
  **If your source index doesn't exist**, the move operation is ignored.
  You can still use [`waitTask`](/doc/libraries/sdk/v1/methods/wait-task) for this job.
</Info>

### Move indices between apps

To move an index between apps, use the [`copyIndex` method](/doc/libraries/sdk/v1/methods/copy-index#copy-index-between-apps).

### Move 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

<CodeGroup>
  ```cs C# theme={"system"}
  // 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");
  ```

  ```go Go theme={"system"}
  // Use an API key with `addObject` ACL
  client := search.NewClient("YourApplicationID", "YourAPIKey")

  // Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  res, err := client.MoveIndex("indexNameSrc", "indexNameDest")
  ```

  ```java Java theme={"system"}
  // Use an API key with `addObject` ACL
  SearchClient client = DefaultSearchClient.create("YourApplicationID", "YourAPIKey");

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

  // Asynchronous
  client.moveIndexAsync("indexNameSrc", "indexNameDest");
  ```

  ```js JavaScript theme={"system"}
  const algoliasearch = require('algoliasearch');

  // Use an API key with `addObject` ACL
  const client = algoliasearch('YourApplicationID', 'YourAPIKey');

  // Rename indexNameSrc to indexNameDest (and overwrite it)
  client.moveIndex('indexNameSrc', 'indexNameDest');
  ```

  ```kotlin Kotlin theme={"system"}
  // Use an API key with `addObject` ACL
  val client = ClientSearch(
    ApplicationID("YourApplicationID")
    APIKey("YourAPIKey")
  )
  // Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  val index = client.initIndex(IndexName("indexNameSrc"))
  index.moveIndex(IndexName("indexNameDest"))
  ```

  ```php PHP theme={"system"}
  <?php
  require_once __DIR__."/vendor/autoload.php";
  use Algolia\AlgoliaSearch\SearchClient;

  // Use an API key with `addObject` ACL
  $client = SearchClient::create(
    'YourApplicationID', 'YourAPIKey'
  );

  // Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  $index = $client->moveIndex('indexNameSrc', 'indexNameDest');
  ```

  ```python Python theme={"system"}
  from algoliasearch.search_client import SearchClient

  # Use an API key with `addObject` ACL
  client = SearchClient.create("YourApplicationID", "YourAPIKey")

  # Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  client.move_index("indexNameSrc", "indexNameDest")
  ```

  ```ruby Ruby theme={"system"}
  require 'algolia'

  # Use an API key with `addObject` ACL
  client = Algolia::Search::Client.create(
    'YourApplicationID', 'YourAPIKey'
  )

  # Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  client.move_index('indexNameSrc', 'indexNameDest')
  ```

  ```scala Scala theme={"system"}
  // Use an API key with `addObject` ACL
  val client = new AlgoliaClient("YourApplicationID", "YourAPIKey")

  // Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  client.execute { move index "indexNameSrc" to "indexNameDest" }
  ```

  ```swift Swift theme={"system"}
  import AlgoliaSearchClient

  // Use an API key with `addObject` ACL
  let client = SearchClient(
    appID: "YourApplicationID",
    apiKey: "YourAPIKey"
  )

  // Rename `indexNameSrc` to `indexNameDest` (and overwrite it)
  client.moveIndex(from: "indexNameSrc", to: "indexNameDest") { result in
    if case .success(let response) = result {
      print("Response: \(response)")
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="indexNameDest" type="string" required>
  Index name of the destination index.
</ParamField>

<ParamField body="indexNameSrc" type="string" required>
  Index name of the index to move.
</ParamField>

## Response

<ResponseField name="taskID" type="integer">
  The `taskID` used with the [`waitTask`](/doc/libraries/sdk/v1/methods/wait-task) method.

  <Info>
    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.
  </Info>
</ResponseField>

<ResponseField name="updatedAt" type="string">
  The date, in [Unix timestamp format](/doc/guides/sending-and-managing-data/prepare-your-data/in-depth/what-is-in-a-record#dates), when the job to copy the index was created.
</ResponseField>

### 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.

```jsonc JSON icon=braces theme={"system"}
{
  "updatedAt": "2017-12-18T21:22:40.761Z",
  "taskID": 19541511530
}
```
