One index or multiple indices for federated search
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. To learn more, see Multi-index search with InstantSearch.js.Multiple indices for federated search
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.
Single index for federated search
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. To learn more, see Create replica indices.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.
To learn more, see Manage your Algolia applications.