Skip to article
Catalog Quality Jul 9, 2026 32 min read

Ecommerce Search Indexing: Documents, Freshness, Rebuilds, and Health Checks

A product can be correct in the commerce admin and wrong in search. The search system usually queries a derived document, not the live catalog record. Between those two states, an update can be missed, transformed incorrectly, written out of order, left invisible to queries, or rendered with a different variant.

That is why “reindex it” is not a diagnosis. A rebuild will not fix an unpublished product, an omitted SKU field, an older event overwriting a newer one, a missing deletion path, or a theme that ignores the matching variant.

This guide explains the complete indexing path, the document decisions that shape findability, the reliability controls behind fresh data, a timestamped health check, and a safe way to validate a rebuild before it changes production search.

Evidence boundary

The architecture is platform-neutral. Elasticsearch examples are explicitly scoped to Elasticsearch, and Shopify behavior is scoped to official Shopify documentation checked July 28, 2026. Your engine, app, theme, cache, market, and publication state still need direct inspection.

Chapter 1 · The data path

An index is a versioned projection of the catalog

The source catalog answers operational questions: what the item is, which variants exist, where it can be sold, what it costs, and whether it is available. A search document selects and transforms the subset needed for retrieval, filtering, ranking, and result display.

The projection may combine several systems. A product title can come from a PIM, stock from an inventory service, price from a market-specific offer, and publication state from the commerce platform. The index is only trustworthy when each field preserves identity, context, source version, and update ownership.

Source-to-storefront trace

Stop at the first checkpoint where the expected identity, value, or context changes.

Catalog change moving through six search indexing checkpointsSourceID + versioncontextIngestdelivery + retrydeduplicationProjectmap + normalizevalidateWritedocument + deletevisibilityQueryretrieve + filterrank + returnRendervariant + pricestock + URLTrace keyproduct ID · variant ID · source version · market · publication · timestamps

Source state

Owns
The latest product, variant, offer, price, stock, publication, and deletion state
Keep as evidence
Source ID, version or updated timestamp, market and publication context
Typical failure
The expected value was never saved or is not eligible for the active storefront.

Ingestion

Owns
Events, scheduled reads, bulk imports, authentication, retry, and deduplication
Keep as evidence
Delivery ID, received time, attempt count, job or batch ID
Typical failure
The change was missed, delayed, duplicated, or rejected before transformation.

Projection

Owns
The search document schema, normalization, product or variant granularity, and field mapping
Keep as evidence
Transformer version, output document, validation result, source lineage
Typical failure
The record arrived but the searchable document dropped, flattened, or changed the value.

Index write

Owns
Create, update, delete, version ordering, write acknowledgement, and search visibility
Keep as evidence
Document ID, source version, index version, write and refresh timestamps
Typical failure
The write failed, an older event won, a deletion was missed, or the change is not visible yet.

Query response

Owns
Queried fields, filters, ranking, result projection, and active index or alias
Keep as evidence
Query payload, active index version, returned IDs, matched fields, filter state
Typical failure
The document exists but is excluded, queried incorrectly, or ranked outside the inspected set.

Storefront render

Owns
Theme, search UI, selected variant, displayed price and stock, caching, and URL handoff
Keep as evidence
Rendered result card, selected variant, request and response capture, cache state
Typical failure
The response is correct but the page hides, replaces, or misrepresents it.

This model separates indexing from relevance. If the expected document and fields are absent, the problem is upstream of ranking. If the document is present and eligible but appears too low, use the judged-query process in the ecommerce search relevance guide.

It also separates index health from storefront eligibility. Shopify documents that Online Store publication, unlisted status, the seo.hidden metafield, and Search & Discovery settings can affect whether an item appears in Shopify-powered search. Check those controls before diagnosing a missing index document.

Chapter 2 · Document design

Choose document granularity before choosing fields

The primary design decision is not “which fields should we index?” It is “what does one document represent?” Product-level, variant-level, and nested models can each work, but they create different retrieval and rendering obligations.

A field is not useful merely because it appears in the source JSON. It must be projected at the correct granularity, mapped with the intended search behavior, included in the query, and carried into the result card. The catalog-quality field contract should define the value before the indexing contract transforms it.

Document strategyWhat it makes easierWhat it can breakRequired test
One document per productSimple result counts and product cards. Shared content is stored once and product-level ranking is straightforward.Variant identifiers, price, stock, and compatibility can be flattened. The correct product may appear without the matching variant selected.Search a variant-only SKU or option combination and inspect the returned variant, URL, price, and stock.
One document per variantPrecise identifier retrieval and variant-level filtering. Each sellable configuration can carry its own commercial state.Results can duplicate a product family. Shared text is repeated and grouping must be deliberate.Search a broad product-family query and verify deduplication, grouping, and result counts.
Product document with nested variantsPreserves family context while retaining variant evidence when the engine and query model support it.Nested matching and result projection are easier to implement incorrectly. A matching child must survive into the card and URL.Match one nested variant and trace which child caused the hit through the response and storefront.

Stored is not searchable

A value can exist in the document source but be excluded from the searchable mapping or queried fields.

Indexed is not queried

A mapped field can remain invisible if the live query omits it or applies the wrong exact, analyzed, locale, or filter behavior.

Matched is not rendered

A variant can cause the match while the UI still displays the parent image, default price, wrong stock, and an unselected URL.

Chapter 3 · Change paths

Upserts, deletions, and rebuilds solve different problems

An incremental upsert keeps an existing document current. A deletion removes a document that should no longer be eligible. A full rebuild creates a complete new population under a schema or logic version. Treating all three as “sync” hides important failure modes.

Event delivery is also not the same as correct indexing. Shopify’s webhook guidance says deliveries can be duplicated, recommends idempotent processing, and recommends a reconciliation job for data that might be missed. Those are general reliability lessons for any event-driven indexer: acknowledge, queue, deduplicate, retry, inspect failures, and periodically compare the derived index with the source.

Incremental upsert

Use when
A product, variant, price, stock value, or attribute changes
Reliability contract
Idempotent writes, stable document IDs, version ordering, retries, and a way to inspect failures
Prove it
Repeat the same event and deliver an older event afterward. The final document should still reflect the newest source state.

Deletion or loss of eligibility

Use when
A product is deleted, unpublished, unlisted, excluded from a market, or no longer sellable
Reliability contract
An explicit delete or tombstone path. Upserts alone cannot remove documents that no longer appear in a source feed.
Prove it
Remove one controlled item, then prove it disappears from the document store, query response, filters, and storefront.

Full rebuild

Use when
The schema, analyzer, normalization logic, document granularity, or large source population changes
Reliability contract
A destination version, progress and failure accounting, validation before traffic moves, and a rollback path
Prove it
Compare counts and sampled documents, replay judged queries, then switch traffic and retain the previous version long enough to reverse.

Out-of-order updates need a policy

Asynchronous events can arrive out of sequence. Compare source versions or authoritative timestamps before overwriting a document. Elasticsearch, for example, exposes sequence numbers and primary terms for optimistic concurrency control so an older operation does not overwrite a newer document. Other engines and pipelines use different mechanisms, but the invariant is the same: newest authoritative state must win.

Chapter 4 · Failure isolation

Name the broken state before choosing a fix

“Stale index” is often used for any search result that looks wrong. That label is too broad. The document may be absent, stale, malformed, attached to the wrong identity, hidden by eligibility, written to an inactive version, excluded by the query, or rendered incorrectly.

Use the shopper-visible symptom only as the entry point. The proof must compare the same entity and context across each checkpoint.

Visible symptomAsk firstLikely layerEvidence that resolves it
New item never appearsIs the item eligible for this storefront and market?Source state, ingestion, or document creationCompare publication state, source timestamp, received event, projected document, index lookup, and query response.
Old price or stock remainsWhich surface is stale: response data or rendered card?Incremental update, ordering, refresh, cache, or renderTrace the same variant ID and market through source, document, response, and card with timestamps.
Deleted product still appearsWhat emits and processes the delete or loss-of-eligibility event?Deletion path, reconciliation, active index version, or cacheFind the source deletion marker, delete acknowledgement, document absence, and cache expiry.
SKU exists in the document but search cannot find itIs the field queried with the intended exact or analyzed behavior?Mapping, analyzer, query fields, or filterInspect the stored field, its indexed form, query clause, matched fields, and active filters.
Correct ID is returned with wrong variant detailsDid the matching variant survive result projection and rendering?Document granularity, response projection, or storefront handoffFollow product ID, variant ID, matched field, selected option, URL, price, and stock as one trace.
Results changed after a rebuildWhat changed besides the document population?Schema, analyzer, normalization, synonyms, query config, or traffic switchDiff index settings and document samples, then replay the same judged query set against both versions.

Use one invariant per trace

For a variant-price incident, the invariant is not merely “the product appears.” It is: the same variant ID, market, currency, source price version, returned price, displayed price, stock state, and URL agree. If identity changes midway through the trace, the comparison is not valid.

Chapter 5 · Freshness contract

Measure freshness from authoritative change to shopper-visible state

“Webhook received in two seconds” is an ingestion metric. It does not prove the new value is searchable. End-to-end freshness begins when the authoritative system commits a change and ends when the intended shopper surface exposes that state.

The target should depend on the event. Price, stock, publication, and legal eligibility may need tighter controls than a long-description edit. Define the allowed lag, then measure the distribution and the misses. Averages can hide the slow tail, so retain individual traces and report percentiles only from observed store data.

Search-visible does not always mean immediately visible after a write. Elasticsearch describes its own search behavior as near real time: a refresh makes operations available to search, and the documented default refresh behavior is periodic rather than immediate. Do not copy that interval into another engine. Do keep “write accepted” and “query can see it” as separate timestamps.

ChangeStart clockStop clockBusiness risk
Product becomes searchableSource confirms publication and eligibilityExpected product is visible on the intended search surfaceMerchandising launch and acquisition traffic
Price changesAuthoritative price version is committedThe same market and customer context shows the new price in searchTrust, promotion accuracy, and market-specific pricing
Stock changesAuthoritative availability state changesSearch response and card show the intended sellable stateDead ends, overselling, and hidden replenishment
Product becomes ineligibleDeletion, unpublish, unlist, or market exclusion is committedThe product is absent from search, filters, and cached result surfacesCompliance, assortment accuracy, and customer confusion
Search schema changesA new projection, mapping, or analyzer version is approvedValidated index version receives production trafficBroad relevance regressions and partial rebuilds

One trace needs several clocks

Source

t0 · committed

Ingest

t1 · received

Search

t2 · query-visible

Storefront

t3 · rendered

Ingest lag: t1 − t0

Index lag: t2 − t1

End-to-end lag: t3 − t0

Chapter 6 · Health-check procedure

Run one timestamped change through the complete path

A useful index audit is a controlled trace, not a random collection of storefront searches. Keep identity and context fixed, change one observable value, and collect evidence at each handoff.

If you cannot access the internal document or event pipeline, record the boundary. You can still distinguish source eligibility, shopper-visible lag, query behavior, and rendering. Escalate the missing internal evidence to the platform or app owner instead of inventing the cause.

1

Step 1

Choose a controlled record and record the context

Use a non-critical product you can safely edit. Record product and variant IDs, market, publication state, active search surface, current values, and the exact query you will use.

Output: A before-state capture that another person can reproduce.

2

Step 2

Make one observable change

Change one low-risk field with a distinctive test value. Do not change title, price, stock, and publication together because you will lose fault isolation.

Output: One source timestamp, one source version, and one expected storefront result.

3

Step 3

Trace ingestion before polling the storefront

Confirm whether the event or scheduled read was received, authenticated, deduplicated, and accepted. Capture the delivery, job, or batch identifier.

Output: Proof that the change entered the indexing system, or the exact handoff where it did not.

4

Step 4

Inspect the projected document

Check the document ID, product and variant granularity, transformed value, field name, normalization, source version, and eligibility flags before blaming query relevance.

Output: A document diff between expected and actual search data.

5

Step 5

Confirm the write and search-visible state

Verify the write acknowledgement and the document visible to the active search version. A successful write and a search-visible refresh are separate checkpoints in some engines.

Output: Write time, visibility time, active index version, and document lookup.

6

Step 6

Run a controlled query and inspect the response

Use the exact query and context from Step 1. Capture filters, queried fields, returned IDs, matching variant, result position, and displayed fields in the response.

Output: Evidence that the engine included, excluded, or ranked the document.

7

Step 7

Inspect the rendered result and reverse the change

Compare the response with the visible card and URL, then restore the original source value and trace the reversal. The cleanup tests the same path a second time.

Output: End-to-end lag, failure owner, screenshots or payloads, and a verified cleanup.

The incident record

Keep the query, product and variant IDs, market, source version, event or batch ID, document version, active index version, returned IDs, selected variant, timestamps, and screenshots in one record. “Search was stale yesterday” cannot be reproduced. This evidence packet can.

Chapter 7 · Safe rebuilds

Build a new version, validate it, then move traffic

A full rebuild is appropriate when the document schema, analyzer, normalization, or population changes substantially. It is not a safe first response to an unexplained missing product.

Where the platform supports versioned destinations or aliases, build beside the current index instead of mutating production in place. Elasticsearch’s Reindex API, for example, copies documents from a source to a destination and supports asynchronous execution and throttling. That is an engine-specific implementation, not a universal API. The general release pattern is build, account, compare, evaluate, switch, observe, and reverse if needed.

1

Build

Pin the schema and transformer version. Write to a new destination. Count attempted, accepted, rejected, skipped, and deleted records.

2

Compare

Compare source-eligible entities with destination documents by category, market, publication state, and product or variant granularity.

3

Sample

Diff representative documents for identifiers, searchable text, filters, prices, stock, URLs, timestamps, and normalization.

4

Evaluate

Replay known-item, category, attribute, problem, compatibility, and broad discovery queries against old and new versions.

5

Switch

Move traffic only after validation. Record the active version and switch time. Watch errors, latency, result counts, and judged-query regressions.

6

Reverse

Keep a tested rollback path and the previous version until the new index has survived the agreed observation window.

Counts are necessary, not sufficient

Equal document counts can hide missing variants, wrong market projections, duplicate identities, stale values, and different analyzers. Compare distributions and documents, then replay queries.

Reconciliation is a standing control

Compare source-eligible entities with indexed entities on a schedule. Investigate missing, extra, duplicate, stale, and rejected documents before shoppers report them.

Chapter 8 · Operating model

Monitor the contract, not just the indexing job

A green scheduled job can coexist with stale storefront results. Health needs to cover source coverage, delivery, projection validation, write failures, search-visible freshness, reconciliation differences, query checks, and result-card consistency.

Start with the events that create the largest customer risk. For each one, name the owner, source of truth, required context, document identity, freshness target, alert condition, recovery procedure, and proof that the storefront is correct again.

Coverage

Are all eligible source entities represented at the intended document granularity?

Freshness

How long do product, price, stock, publication, and deletion changes take end to end?

Correctness

Do sampled documents preserve identity, value, market, variant, and source version?

Reliability

Are duplicates harmless, retries bounded, failures visible, and older updates rejected?

Release safety

Can the team compare versions, replay judged queries, switch traffic, and roll back?

Storefront integrity

Do returned IDs, matching variants, prices, stock, URLs, and visible cards agree?

If the first failure is in the source record, use the product-data audit procedure. If the product is missing only from Shopify storefront search, follow the Shopify product-visibility diagnostic. If price or stock changes somewhere between response and card, use the price and stock trace.

The indexing system is healthy when the team can explain where each searchable field came from, prove how current it is, show which document and index version served the query, and reconcile that response with the storefront. That is a stronger standard than “the sync ran.”

ParticleSearch makes catalogue readiness a merchant-visible contract

ParticleSearch is a fit when the store should not have to operate its own indexing system to know whether search is ready. The dashboard separates storefront status, Shopify connection, catalogue coverage, index freshness, delivery health, and query evidence. A green storefront does not conceal a stale catalogue, and a healthy catalogue does not pretend that every query is relevant.

Catalogue releases have visible states. A candidate version can be built and checked before it becomes live, the last validated version can keep serving when a new build fails, and a previous version can be restored when recovery is required. Durable delivery evidence and source-to-index reconciliation help distinguish a missed change from an incorrect source record.

After verification, the merchant should not need to infer freshness from a scheduled-job timestamp, accept a partial rebuild as the live catalogue, or treat every missing result as a ranking problem. ParticleSearch cannot make a draft product eligible or correct a wrong Shopify value. It owns the search-ready catalogue and the operational evidence needed to show whether that catalogue is current.

Review the ParticleSearch catalogue-health and recovery path

Primary references

These sources establish the engine-specific and platform-specific facts used above. The diagnostic framework and operating model are ParticleSearch editorial guidance.