What are slaves indices and what are their benefits?

Algolia uses a lot of techniques to optimize the speed of its search engine. One of them is to pre-compute most of the search ranking when objects are indexed rather than when a search is performed.

This has a huge impact on performance (and you know how critical speed is to us!), but it also implies that we cannot apply multiple ranking strategies on a single index.The master-slave feature is here to help with this. When you add a slave to an index, it will create a duplicate of this index, that contains exactly the same records. If you add/update/delete an object to you master index, we’ll automatically apply the same modification to its slaves.This way you can have multiple indices that have the same content, but can have a different configuration.This is great if you want to apply different ranking strategies to the same objects.For example if you want to add a sort by price, a sort by date, or even if you want to run an A/B test, you just need to create a slave for each ranking strategy.You can read more about this feature in our documentation.To create a slave index, just go to the Slaves tab of your dashboard, and add a new entry.

One thing to note: having an slave index duplicates your objects, so it increases the number of records and has an impact to our pricing, since it is partly based on the number of records that you have.As for operations, we only count operations on the master indice.

Last updated