Multilingual text, exact identifiers, typed facets, sorting and URL state make discovery understandable and repeatable.
BlueShop Search & Elasticsearch — As Built
What this showcase explains: shoppers can refine, revisit and understand search results while Catalog keeps Elasticsearch synchronized as a rebuildable read model, not a transactional source of truth.
1. What Search Delivers
Search connects customer intent to current sellable Catalog facts without moving product ownership into Elasticsearch.
Product and Stock facts become coalesced work; the worker rehydrates current Catalog state before upsert or removal.
2. Refine, Sort, Reload
A shopper narrows a real category and returns to the same search state after browser reload.
Refine, Sort, Reload
Matter compatibility, AeroClean brand, battery power, free text and price order reduce the list while result and facet counts stay useful. Reload restores the complete state from the URL.
3. Product Lifecycle Changes Search
Publish, Rename, Archive
The Aurora field camera is absent before publication, appears when published, answers to its new localized name after an edit and disappears after archival. No manual reindex appears in the journey.
4. Availability Changes Search Visibility
Hide Sold Out; Restore on Receipt
The Astra wireless headset starts with six units, leaves storefront search after a warehouse write-off and returns after a receipt adds twelve. Stock remains the authority throughout.
5. One Product, Many Ways to Find It
Names, Languages, SKU and EAN
A rare exact-name match outranks a description-only match. French, German and Italian names plus exact SKU and EAN searches resolve the same stable product identity.
6. Business Result
- 01Discovery remains understandableFilters, counts, sorting and URL state let shoppers refine without losing context.
- 02Lifecycle remains customer-visibleOnly current published products remain eligible for normal search results.
- 03Availability remains owned by StockCatalog projects Stock facts instead of inventing stock truth.
- 04Search remains rebuildableElasticsearch can be reconstructed from authoritative Catalog state.
How storefront search works
Catalog owns both query semantics and projection orchestration. Elasticsearch serves bounded reads through aliases and never participates in transactional Catalog writes.
7. Ownership Dependencies
There is no deployed Search microservice. Search is a Catalog-owned read capability with Stock-projected availability.
8. Read Path, Relevance and Facets
The public search endpoint builds a bounded Elasticsearch query from URL-backed storefront state.
| Indexed relevance area | Current boost | Purpose |
|---|---|---|
| Curated product search terms | 40 | Strongest merchandising intent |
| Category path names / terms | 8 / 6 | Category context |
| SKU and EAN | 5 | Exact operational identifiers |
| Product names DE/FR/IT/EN | 4 | Localized discovery |
| Description and searchable attribute text | 1 | Broad supporting text |
9. Durable Product Indexing
Product events do not write Elasticsearch directly. They record durable PostgreSQL work keyed by product ID; repeated work coalesces before the worker reads current state.
10. Stock-Driven Visibility
Stock events update Catalog’s availability projection and enqueue the same durable product-index work.
11. Recovery, Documents and Aliases
The full rebuild scans published products from Catalog, hydrates current metadata and availability, upserts documents, then removes stale IDs.
catalog-products-v1 index. The current code provides a future migration seam but does not implement blue-green alias rotation.| Document area | Indexed facts |
|---|---|
| Identity | Product ID, SKU, EAN, slug and lifecycle status |
| Merchandising | Thumbnail, brand, tax-inclusive price and creation time |
| Category | Leaf category, full path IDs, localized names and curated terms |
| Search text | Curated terms plus localized name and description |
| Attributes | Nested code/type with enum, numeric, boolean or localized text values |
| Availability | Catalog’s projected inStock value |