flow

Product Search Indexing

How a change to a product in the catalog reliably flows into the search index — via the outbox, product events and the indexer — so search stays in sync without coupling to the catalog database.

Flow

Overview

Product Search Indexing documents how the Search SystemSearch SystemSystemv1.0.0Internal system that keeps product data searchable. Consumes product change events from the Product Catalog System, main...Ownersearch-platformMapView docs keeps its index in sync with the catalog. The search index is a derived read model — never a source of truth — so it can be rebuilt at any time by replaying product events.

How it works

  1. A merchant changes a product via the Product APIProduct APIServicev1.0.0The public-facing API for the product catalog. Handles commands to create, update and delete products, serves product re...Subscribescreate-product, update-product +2APIsOpenAPIOwnerproduct-platformMapRepoView docs, which writes the change and an outbox row to the Product DatabaseProduct DatabaseContainerv1.0.0PostgreSQL database that is the system of record for all product data.MapView docs in one transaction.
  2. The Product Search PublisherProduct Search PublisherServicev1.0.0Reads product changes from the product database (outbox) and reliably publishes product-created, product-updated and pro...Publishesproduct-created, product-updated +1Ownerproduct-platformMapRepoView docs reliably drains the outbox and publishes Product CreatedProduct CreatedEventv1.0.0Published when a new product has been added to the catalog. Ownerproduct-platformSchemaMapView docs, Product UpdatedProduct UpdatedEventv1.0.0Published when an existing product's data has changed. Ownerproduct-platformSchemaMapView docs or Product DeletedProduct DeletedEventv1.0.0Published when a product has been removed from the catalog. Ownerproduct-platformSchemaMapView docs.
  3. The Search IndexerSearch IndexerServicev1.0.0Consumes product change events from the Product Catalog System and keeps the search index up to date so products are dis...Subscribesproduct-created, product-updated +1Ownersearch-platformMapRepoView docs consumes those events and applies them to the Search IndexSearch IndexContainerv1.0.0The denormalised, search-optimised index of products that powers product search.MapView docs.
  4. The change is now searchable via the Search API — with no direct coupling between search and the catalog database.