Delete a replica index
Deleting a standard or virtual replica requires two steps:
- Unlink the replica index from the primary index. This turns the replica index into a regular index.
- Delete the replica index.
Unlink replicas in the dashboard
- Go to the Algolia dashboard and select your Algolia application.
- On the left sidebar, select Search.
-
Select the Algolia index you want to configure:
Make sure to select the primary index.
-
On the Replicas tab, click Unlink Replica for the replica you want to unlink.
- Save your changes.
Now, you can delete your replica index.
Unlink replica indices with the API
To unlink a replica index from its primary index,
remove it from the replicas
setting of the primary index,
using the setSettings
method:
1
2
3
$primary_index->setSettings([
'replicas' => []
]);
Now, you can delete your replica index.
If want to keep other replicas of the primary index,
don’t remove them from the replicas
setting.
If you set replicas
to an empty string or list, all replicas will be unlinked.