Table of contents :

One Index or Multiple Indexes?

100-days-of-algolia-007

Table of contents :

The decision to use one Algolia index or several should follow the search experience, data boundaries, and operational requirements of the WooCommerce store. It should not be based only on how the catalog is organized in WordPress.

What an Algolia index represents

An Algolia index is a searchable collection of records with its own settings, searchable attributes, ranking configuration, synonyms, rules, and replicas. In a WooCommerce implementation, an index might contain products, product variations, blog content, documentation, or records from several stores.

The right design starts with the question: Do these records need to be searched, ranked, filtered, secured, and maintained in the same way? If the answer is yes, a shared index is often simpler. If the answer is no, separate indexes may be more appropriate.

When one index is usually the better choice

Products share the same search experience

A single product index works well when shoppers search across the same catalog and use common facets such as price, brand, product category, stock status, and attributes.

For example, a store selling clothing can keep products in one index and use facets for:

  • categories
  • brand
  • color
  • size
  • price
  • in_stock

Splitting every category into a separate index would create unnecessary indexing jobs and require the frontend to select an index before it knows what the shopper wants to find. Facets and filters are normally the better fit for this type of segmentation.

The same records support autocomplete and results pages

Autocomplete, instant search, category search, and a search results page can all query the same primary index. Different ranking needs can be handled with replicas rather than by duplicating the catalog into unrelated indexes.

The catalog is shared across several storefront features

A unified index can make it easier to keep product visibility, inventory, pricing, and merchandising data consistent across the header search, product listing pages, recommendations, and internal search tools.

Use replicas when the records are the same but ranking differs

Replicas are designed for cases where the same records need different ranking strategies. A primary product index might rank by textual relevance and business ranking, while replicas rank by price, date added, or sales volume.

For example, a WooCommerce agency could configure:

  • products_prod as the primary index for relevance
  • products_prod_price_asc for lowest-price sorting
  • products_prod_newest for newest products
  • products_prod_popular for best-selling products

Standard replicas contain synchronized records and have their own ranking configuration. Virtual replicas are useful when the team wants alternative ranking strategies without maintaining a separate full copy of the records. The appropriate replica type depends on the required ranking behavior and Algolia plan.

When multiple indexes are appropriate

Different languages require different searchable content

Separate indexes can be a good choice when each language has its own product names, descriptions, synonyms, stop-word behavior, and merchandising rules. For example:

  • products_en_prod
  • products_fr_prod
  • products_de_prod

This approach avoids mixing language-specific content and allows each index to have settings appropriate to that language. A shared index with localized fields can still work when the frontend and relevance strategy are carefully designed, but it can become difficult to manage as the number of locales grows.

Different storefronts have independent catalogs

Separate indexes are often preferable for independent brands, regional stores, or WooCommerce multisite installations when each storefront has different products, prices, inventory, promotions, or administrators.

Use predictable names that include the site and environment, such as brand_a_products_staging and brand_a_products_production. This reduces the risk of sending staging data to a live storefront or clearing the wrong index during a reindex.

Different audiences need materially different records

A B2B store and a retail store may share a product catalog but expose different prices, minimum quantities, availability, or customer-specific metadata. If those differences cannot be safely and reliably handled at query time, separate indexes may be safer.

Do not put confidential customer pricing, private products, or authorization-sensitive data into a public index and assume a filter provides security. Algolia filters are part of the search request and should not be treated as a complete authorization boundary. Sensitive data should be excluded or protected through an architecture designed for that access model.

Products and content need different search behavior

Product records and editorial content usually have different attributes, ranking rules, synonyms, and click analytics. Keeping products in a product index and articles in a content index often makes both experiences easier to tune.

WooCommerce product and variation decisions

The choice between products and variations deserves separate attention. Indexing one record per parent product keeps results compact and is suitable when shoppers select options on the product page. The record can include searchable attributes and a structured list of variation data.

Indexing each variation as its own record is useful when shoppers need to search or filter directly by variation-specific information, such as SKU, size, color, warehouse availability, or variation price. In that model, the frontend should group or deduplicate variations so the results page does not show the same parent product repeatedly.

For either model, define how the index handles:

  • published and private products
  • catalog visibility
  • in-stock and backorder states
  • customer-specific prices
  • deleted or trashed products
  • parent products whose variations have different availability

A reindex should not only add current records. It must also remove records for products that were deleted, unpublished, or made unavailable.

Do not create indexes solely for filters

A common over-engineering pattern is creating an index for every category, brand, price range, or sales channel. This multiplies synchronization work and makes settings drift likely. If the records and ranking are shared, use facets, numeric filters, and rules within a common index.

Separate indexes should reflect a meaningful difference in data ownership, language, storefront, access model, or search behavior. They should not merely mirror every navigation path in the WooCommerce site.

Environment and deployment strategy

Production and staging should always use separate indexes. A practical naming scheme is:

products_{site}_{environment}

For example:

products_main_staging<br>products_main_production

Keep index settings in version control and apply them as part of deployment. Configure replicas, searchable attributes, ranking, facets, synonyms, and rules deliberately rather than relying on settings that happen to exist in the dashboard.

A practical decision checklist

  1. Do the records belong to the same storefront and environment?
  2. Do they share the same language and searchable fields?
  3. Can facets and filters express the required catalog segmentation?
  4. Do they need the same ranking and merchandising rules?
  5. Are any records or attributes private?
  6. Can products and variations be represented without confusing duplicate results?
  7. Will the indexing pipeline reliably update and delete every record?

If the answers are mostly yes, start with one primary index and use facets or replicas where appropriate. If the data has different ownership, language, access requirements, or operational lifecycles, separate indexes will usually provide a cleaner and safer implementation.

Trending posts
You might also like