12 Jul 2026 · 1 min read
Magento 2 search with OpenSearch / Elasticsearch
Magento's catalog search runs on a dedicated engine — OpenSearch or Elasticsearch. We cover the index and the reindex pipeline for fast search at scale.
MySQL LIKE queries don't scale to a multi-million-SKU catalog. Magento offloads search to a dedicated engine — OpenSearch or Elasticsearch — and that's the backbone of storefront findability.
Why a search engine, not SQL
Catalog search needs partial matches, faceted filtering, ranking, and typo tolerance across huge indexes. A document engine indexes products as documents and answers queries in milliseconds, where SQL would scan and join EAV tables painfully.
The index and the pipeline
Magento maintains a search index as documents in OpenSearch. The flow:
- Products are read via collections (the EAV model from earlier).
- The
catalogsearchindexer transforms them into search documents. - Documents are pushed to OpenSearch.
- Storefront search queries OpenSearch directly, with facets for price, category, and attributes.
Keep the indexer scheduled (or queue-driven) so new and updated products become searchable promptly.
Running it locally
Govard provisions the search engine as part of the stack — OpenSearch 3.0 in the default Magento 2 configuration — so your local search behaves like production. While the environment is up, you can rebuild the index from govard shell:
bin/magento indexer:reindex catalogsearch_fulltext
Operational notes
- Monitor index size and shard count as the catalog grows.
- A stale index is the usual cause of "new product not showing in search" — reindex first, debug later.
- Facet performance depends on attribute storage; index the attributes you filter on.
What's next in this series
We've covered the read paths. The hardest operational task is the upgrade — and the profiling that proves it's worth it. Next: safe Magento 2 upgrades and the profiler.
Next in this series: Upgrading Magento 2 safely + profiling —
/blog/magento2-upgrade-profiling