Guides / Sending and managing data / Manage indices and apps / Manage indices / Concepts

Choosing between one or more indices

Should you create one large index for all your records, or create multiple indices? It depends on your ranking strategy and which user experience you want to create.

By default, you can create up to 1,000 indices per Algolia application.

Federated search describes searching multiple types of data sources. One data source may be your product catalog. Another data source may be a support FAQ, or Query Suggestions.

Depending on how you want to organize and present the search results, you can create one index for all data sources or separate indices for each data source.

Using multiple indices is useful when:

  • You need to configure each index independently. For example, one index for movies, another for actors. With federated search, you can show results from both indices in the same interface, allowing users to search for both actors and movies.

  • You want to use different ranking strategies for the same data. For example, showing highest-rated and showing most recent movies.

Using a single index is useful when you want to use a single ranking strategy. Users can search for anything, see movies and actors in the same results list, ranked by the same relevance configuration.

Multiple indices for Query Suggestions

Query Suggestions suggest popular search queries to users to help them search faster. Since Query Suggestions are stored in a separate index, you’d use multiple indices: one for your content, and one for the Query Suggestions.

Multiple indices for different ranking strategies

Each Algolia index can have one ranking strategy. If you want to let users switch between different ranking strategies, for example, to allow sorting by price, you can use replica indices— one index per sorting strategy.

A replica index is a copy of the main index with the same records, but a different ranking strategy.

Multiple indices for different environments

If you use different environments, for example, staging and production environments, it’s best to use separate indices for each environment. This prevents your Analytics from getting skewed by test queries, prevents indexing accidents, and keeps each environment more secure.

You can use common prefixes to distinguish the different environments, for example, staging_products and prod_products. To reduce the number of indexing operations, you can reduce the number of records in your staging environments, for example, only using 10% of your records.

Did you find this page helpful?