Typesense Search Engine for Magento 2 by Maksym DernovyiTypesense Search Engine for Magento 2 by Maksym Dernovyi

Typesense Search Engine for Magento 2

Maksym Dernovyi

Maksym Dernovyi

Problem

Magento's native search runs on Elasticsearch or OpenSearch. Making an attribute filterable invalidates the catalog search index, so a single flag change turns into a full reindex, which on a large catalog is a long job.

What I built

A free, open-source Typesense search engine for Magento 2.4.9 (PHP 8.3–8.5, Typesense 30+), split into three Packagist packages:
typesense-core: client, collections, aliases, documents, schema reconciler
typesense-indexer: builds and updates the index, patches the schema, syncs synonyms
typesense-search: registers Typesense as a selectable engine for quick and advanced search, category listings, layered navigation, price ranges, native search synonyms and "did you mean"

Technical highlights

Full reindex builds a new collection per store view, imports in batches and swaps the alias as the last step, so the storefront keeps reading the old collection until the new one is ready. Orphaned versions are dropped after each swap
Changing is_filterable applies an in-place schema PATCH that rebuilds from documents already stored, with no reimport (README example: about 0.3 s on 50k documents). It falls back to native invalidation when a PATCH is unsafe or the change is above a configurable threshold
Partial updates upsert changed products first and only then delete the rest in batches, so products do not disappear mid-update
Extension points are DI-sorted pipelines (query modifiers, response processors), not preference overrides
Differences from Elasticsearch/OpenSearch are documented, e.g. SKU prefix matching and position sort with several categories
Integration tests run against a real Typesense instance

Links

Like this project

Posted Nov 1, 2026

Open-source Typesense engine for Magento 2.4.9: search, layered navigation, zero-downtime alias-swap reindex, in-place schema patch for filterable attributes.