KwadMarket Docs
Product Roadmap

Search

Meilisearch — implemented; remaining polish and UX improvements

Status: implemented

Meilisearch is live — SearchService in apps/back indexes products, with reindexAll as the recovery hatch. What remains below is operational hardening (tracked in Operations §7) and UX polish.

Why Meilisearch (decision record)

CriteriaMeilisearchElasticsearch
SetupSingle binary, zero configJVM, cluster management
RAM~50MB for 50k docs1–2GB minimum
Typo toleranceBuilt-in, excellentPlugin required
Latency<50ms~100–200ms
Best for<10M documents>10M documents

For 5k–50k products, Meilisearch is the clear winner.

Operational rules (enforce — see plan)

  • Every product mutation path updates the index (create/update/delete/updateSpecs/import) — audit ProductsService and the scraper import path.
  • MEILISEARCH_API_KEY required in production (env.config.ts should enforce it like JWT_SECRET).
  • Deals search stays Postgres-ILIKE for now (fine at current volume). When deal volume justifies it, index deals through the same SearchService rather than a second client.
  • Fallback: if Meilisearch is down, fall back to a PostgreSQL ILIKE query.

Remaining UX improvements

  • Instant search-as-you-type in the header search bar (replace the 300ms debounced query) with highlighted matching text.
  • Search suggestions / autocomplete dropdown.
  • Faceted category counts in the product browse page ("Frame (42)", "Motor (89)") — Meilisearch facets are built-in.
  • Frontend integration choice: direct Meilisearch access with a search-only key is fastest (<20ms, supports CORS + tenant tokens); the backend proxy adds latency but centralizes auth/logging. Direct-with-search-key is the recommendation if/when instant search ships.

Later

  • Index deals in a separate Meilisearch index (same SearchService), enabling typo-tolerant deal search and facets over condition/price.
  • Public price-history data joined into search results once the scraper price history exists.

On this page