magedevgroup / module-typesense-search
Registers Typesense as a selectable Magento search engine and implements the query side: translates a Magento search request into a Typesense query and returns matched IDs plus aggregations. Serves quick/advanced search, category listings and layered navigation. Drop-in replacement for OpenSearch/El
Package info
github.com/MageDevGroup-com/module-typesense-search
Type:magento2-module
pkg:composer/magedevgroup/module-typesense-search
Requires
- php: ~8.3.0||~8.4.0||~8.5.0
- magedevgroup/module-typesense-core: >=0.0.1
- magedevgroup/module-typesense-indexer: >=0.0.1
- magento/framework: >=103.0
- magento/module-advanced-search: >=100.0
- magento/module-catalog: >=104.0
- magento/module-catalog-search: >=102.0
- magento/module-config: >=101.0
- magento/module-customer: >=103.0
- magento/module-elasticsearch: >=101.0
- magento/module-search: >=101.0
- magento/module-store: >=101.0
Requires (Dev)
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2026-07-20 08:33:19 UTC
README
Registers Typesense as a selectable Magento 2 search engine and implements the query side
(L2 of the Typesense suite): it translates a Magento\Framework\Search\RequestInterface into a
Typesense query and returns matched product IDs plus aggregations. A free, uncapped drop-in
replacement for OpenSearch/Elasticsearch.
Since Magento 2.4 the engine also drives category listings and layered-navigation counts, so this
one module serves quick search, advanced search, category listings and layered navigation. It
reads only — writing documents and patching schema is typesense-indexer's job.
Install
composer require magedevgroup/module-typesense-search # pulls core + indexer
bin/magento module:enable MageDevGroup_TypesenseCore MageDevGroup_TypesenseIndexer MageDevGroup_TypesenseSearch
bin/magento setup:upgrade
Select Typesense
- Stores → Configuration → Catalog → Catalog Search.
- Set Search Engine to Typesense and fill in the connection fields (host / port / protocol /
API key — owned by
typesense-indexer). The connection is validated on save. - Reindex:
bin/magento indexer:reindex catalogsearch_fulltext.
Switching back to OpenSearch/Elasticsearch is reversible — pick the other engine and reindex.
setup:install --search-engine=typesense --typesense-nodes=<host:port> --typesense-protocol=<http|https>
works too (the API key is set in admin afterwards, via its encrypted backend).
Covered
Quick + advanced search · category listings · layered navigation (facet buckets + counts) · price
ranges / dynamic intervals · typo-tolerant suggestions (honouring catalog/search/search_suggestion_*).
Not yet: synonyms (a later module). Constructs Typesense's grammar cannot express (wildcard /
negated compound filters) degrade to an empty result rather than a wrong one; standard catalog flows
never produce them. etc/search_engine.xml declares only what is implemented.
The QueryModifierInterface seam
Query building is a di-sorted pipeline, never a preference — so paid modules (merchandising,
semantic) compose instead of colliding. The composite ships empty; add a step by merging into the
modifiers array in di.xml:
<type name="MageDevGroup\TypesenseSearch\SearchAdapter\Query\QueryModifier"> <arguments> <argument name="modifiers" xsi:type="array"> <item sortOrder="10" name="merchandising" xsi:type="object">Vendor\Module\Query\MyModifier</item> </argument> </arguments> </type>
Each QueryModifierInterface::modify(array $query, RequestInterface $request): array receives the
previous step's payload; steps run in sortOrder.
Requirements
Magento 2.4.x · PHP 8.3–8.5 · a running Typesense server (connection owned by typesense-indexer).
License
OSL-3.0 © MageDevGroup.