Guides / Managing results / Refine results / Sorting results

Introduction

You can delete a standard or virtual replica through the API or your Algolia dashboard.

Using the API

To delete a standard or virtual replica index through the API, you need to use the setSettings method on the original index to unlink the replica, then use the deleteIndex method on the replica index to delete it.

In the below example, we want to delete the products_price_asc replica.

If the primary index has other replica indices which you don’t want to unlink, they should remain in the replicas parameter.

1
2
3
4
5
$primary_index->setSettings([
  'replicas' => []
]);

$products_price_asc->delete();

Using the Dashboard

You can also delete replica indices in your Algolia dashboard with the following steps:

Deleting a replica through the dashboard

SortBy Widget

  1. Go to your dashboard and select your primary index from the Indices tab.
  2. Click on the Replicas tab.
  3. Click on the Unlink Replica button to remove the relevant replica.
  4. Don’t forget to save your changes.

Did you find this page helpful?