A comprehensive guide for implementing fast, typo-tolerant search using Typesense with Magento 2 and Adobe Commerce, including HyvΓ€ theme compatibility.
Typesense is a modern, developer-friendly search engine that delivers sub-50ms search results with advanced features like typo tolerance, faceted search, and intelligent ranking. This integration provides a powerful alternative to Elasticsearch, Algolia, and default Magento search functionality.
- β‘ Lightning Fast: Sub-50ms search response times
- π§ Intelligent: Machine learning-powered with typo tolerance
- π° Cost-Effective: Especially with self-hosting options
- π¨βπ» Developer-Friendly: Simple API and intuitive configuration
- π§ Easy Maintenance: Minimal operational overhead compared to Elasticsearch
- Purpose: Base Typesense integration for standard Magento themes
- Price: $49.00
- Source: Ceymox Typesense Magento Extension
- Key Features:
- Instant, typo-tolerant search results
- Keyword-specific filtering
- Advanced search facets
- RESTful API integration
- Purpose: Enhanced Typesense integration optimized for HyvΓ€ themes
- Price: $149.00
- Source: Ceymox Typesense HyvΓ€ Module
- Key Features:
- Full HyvΓ€ theme compatibility
- Advanced grouping and sorting
- Alpine.js integration
- Tailwind CSS styling support
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TYPESENSE MAGENTO 2 ARCHITECTURE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β MAGENTO 2 β β TYPESENSE β β DEPLOYMENT OPTIONS β
β FRONTEND β β EXTENSIONS β β β
β β β β β βββββββββββββββββββββββββββ β
β βββββββββββββββ β β βββββββββββββββ β β β OPTION 1: CLOUD β β
β βSearch Field β β β β Base β β β β β β
β βAutocomplete βββΌβββββΌβΊβ Extension β β β β βββββββββββββββββββββββ β β
β βResults Page β β β β β β β β β Typesense Cloud β β β
β βββββββββββββββ β β βββββββββββββββ β β β β - Managed Service β β β
β β β βββββββββββββββ β β β β - Auto Scaling β β β
β βββββββββββββββ β β β HyvΓ€ β β β β β - 24/7 Support β β β
β βHyvΓ€ Theme β β β β Module β β β β βββββββββββββββββββββββ β β
β βComponents βββΌβββββΌβΊβ (Optional) β β β β β β
β βββββββββββββββ β β βββββββββββββββ β β βββββββββββββββββββββββββββ β
βββββββββββββββββββ βββββββββββββββββββ β β
β β β βββββββββββββββββββββββββββ β
β β β β OPTION 2: SELF-HOST β β
βΌ βΌ β β β β
βββββββββββββββββββββββββββββββββββββββββββ β β βββββββββββββββββββββββ β β
β DATA FLOW β β β β Your Server + β β β
β β β β β Proxy Setup β β β
β βββββββββββββββ βββββββββββββββββββ β β β β - Custom Config β β β
β β Magento β β Typesense β β β β β - Full Control β β β
β β Database β β Collections β β β β β - Cost Effective β β β
β β β β β β β β βββββββββββββββββββββββ β β
β β βββββββββββ β β βββββββββββββββ β β β β β β
β β βProduct β β β β products β β β β βββββββββββββββββββββββββββ β
β β βCategory ββΊβΌββΊβ β categories β β β ββββββββββββββββββββββββββββββββ
β β βCMS Page β β β β pages β β β
β β β β β β β suggestions β β β
β β βββββββββββ β β βββββββββββββββ β β
β βββββββββββββββ βββββββββββββββββββ β
β β
β Indexing Process: β
β php bin/magento indexer:reindex β
β βββ typesense_products β
β βββ typesense_categories β
β βββ typsense_pages β
β βββ suggestions β
βββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER SEARCH JOURNEY β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
User Types β Frontend Processes β Typesense API β Results Display
β β β β
βΌ βΌ βΌ βΌ
βββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββ
β "shirt" β β Autocomplete β β Search Request β β Instant β
β "shrit" βββΊβ Suggestions βββΊβ + Typo Fix βββΊβ Results β
β "shurt" β β (Visual β β + Facet Filter β β < 50ms β
βββββββββββ β Facade) β β + Ranking β ββββββββββββ
ββββββββββββββββ βββββββββββββββββββ
Best for: Production environments, teams preferring managed infrastructure
- Pricing: Pay-per-use model - Calculate costs
- Benefits:
- β Zero maintenance overhead
- β Automatic scaling and backups
- β Global CDN and multi-region support
- β 24/7 professional support
- β SSL/TLS encryption included
- Setup: Simple API key configuration
Best for: Budget-conscious projects, custom requirements, data sovereignty needs
- Cost: Free Typesense license + your server costs
- Benefits:
- β Complete control over infrastructure
- β Custom configurations possible
- β No per-search pricing
- β Data stays on your servers
- Requirements:
- Your own server infrastructure
- Proxy configuration for API communication
- Manual maintenance and updates
- Installation Guide: Typesense Self-Hosting Documentation
Recommendation: 2 CPUs, 3 GB RAM with maxcluster's professional hosting
- Register at Typesense Cloud
- Create cluster and obtain API credentials
- Note your cluster URL and API key
- Install Typesense on your server
- Configure proxy server for API communication
- Set up security and firewall rules
Navigate to: Admin Panel > Stores > Configuration > Typesense Search > General
Configuration Settings:
- Enable Search:
Yes
- Search-only (public) API key: Your Typesense API Key
- Cloud Key:
- Cloud: Use your actual API key
- Self-hosted: Any random value (required by extension)
- Index Name Prefix: Unique identifier for your store
- Nodes: Your Typesense endpoint
- protocol: https
- Port: 443
# Save and refresh configuration
php bin/magento cache:flush
php bin/magento cache:clean config
# Index all search data to Typesense
php bin/magento indexer:reindex typesense_categories typesense_products typsense_pages suggestions
Note: Indexing time depends on catalog size. Monitor progress and ensure adequate server resources.
- β Verify Typesense collections are created
- β Test frontend search functionality
- β Confirm autocomplete suggestions work
- β Test faceted search and filtering
- β Validate typo tolerance features
Problem: Search results page layout breaks when using Magento's default search page instead of Typesense's custom layout.
Root Cause: Extension overrides default Magento search layouts.
Solution: Create layout overrides in your theme to revert to default Magento 2 state.
<!-- Example layout override -->
<!-- app/design/frontend/[Vendor]/[Theme]/Ceymox_TypesenseSearch/layout/override/base/catalogsearch_result_index.xml -->
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<body>
<!-- <referenceBlock name="breadcrumbs" remove="true" />-->
<!-- <referenceBlock name="page.main.title" display="false"/>-->
<!-- <referenceContainer name="columns.top">-->
<!-- <block ifconfig="typesense_search_result/instant_search_result/enable_result_page" class="Magento\Framework\View\Element\Template" name="typesense.loader" template="Ceymox_TypesenseSearch::loader.phtml" />-->
<!-- </referenceContainer>-->
<!-- <move element="catalog.compare.sidebar" destination="sidebar.main" />-->
<!-- <move element="wishlist_sidebar" destination="sidebar.main" />-->
<!-- <referenceBlock name="search.result">-->
<!-- <action ifconfig="typesense_search_result/instant_search_result/enable_result_page" method="setTemplate">-->
<!-- <argument name="template" xsi:type="string">Ceymox_TypesenseSearch::search/result.phtml</argument>-->
<!-- </action>-->
<!-- </referenceBlock> -->
<!-- <referenceBlock name="catalogsearch.leftnav">-->
<!-- <action ifconfig="typesense_search_result/instant_search_result/enable_result_page" method="setTemplate">-->
<!-- <argument name="template" xsi:type="string">Ceymox_TypesenseSearch::search/layer/view.phtml</argument>-->
<!-- </action>-->
<!-- <arguments>-->
<!-- <argument name="view_model"-->
<!-- xsi:type="object">Ceymox\TypesenseSearch\ViewModel\General</argument>-->
<!-- </arguments>-->
<!-- </referenceBlock>-->
</body>
</page>
Problem: Typesense scripts loading on every page can impact initial page load performance.
Root Cause: JavaScript libraries loaded regardless of search usage.
Solution: Implement visual facade pattern - load Typesense scripts only when search functionality is actively used.
Implementation Strategy:
- Create lightweight placeholder for search field
- Load full Typesense functionality on first search interaction
- Use lazy loading for autocomplete suggestions
- Implement proper caching strategies
- Visual Facade: Load search scripts only when needed
- Lazy Loading: Implement progressive loading for search suggestions
- Caching: Leverage browser caching for search assets
- Debouncing: Limit API calls during rapid typing
- Indexing Strategy: Schedule reindexing during low-traffic periods
- Memory Management: Allocate sufficient PHP memory for indexing
- Database Optimization: Ensure proper indexing on source tables
- Monitoring: Set up performance monitoring and alerting
- CDN: Use content delivery networks for static assets
- Caching Layers: Implement Redis/Varnish for full-page caching
- Server Resources: Optimize CPU and memory allocation
- Load Balancing: Distribute traffic across multiple instances
# Check indexer status
php bin/magento indexer:status
# Reset and reindex specific indexers
php bin/magento indexer:reset typesense_products
php bin/magento indexer:reindex typesense_products
# Monitor logs
tail -f var/log/typesense.log
tail -f var/log/system.log
tail -f var/log/debug.log
Issue | Symptoms | Solution |
---|---|---|
No Search Results | Empty search results despite indexed data | Check API credentials and server connectivity |
Slow Indexing | Indexing process times out or fails | Increase PHP memory_limit and max_execution_time |
Layout Problems | Search page displays incorrectly | Override extension layout files |
Autocomplete Not Working | No suggestions appear | Verify JavaScript loading and API responses |
Performance Issues | Slow page load times | Implement lazy loading and caching |
- Typesense Docs: https://typesense.org/docs/
- Magento DevDocs: https://devdocs.magento.com/
- HyvΓ€ Documentation: https://hyva.io/documentation
- Ceymox Support: Available through their official website
- Typesense Community: GitHub discussions and Discord
- Magento Community: Stack Exchange, Forums, GitHub
For complex implementations or custom development needs, consider engaging:
- Certified Magento developers with Typesense experience
- Ceymox professional services team
- Specialized e-commerce agencies
- Extension licenses governed by Ceymox terms and conditions
- Typesense follows Apache 2.0 license for open-source version
- This documentation provided under MIT license
- Please review individual component licenses before production use
- Purchase required Ceymox extensions
- Choose deployment method (Cloud vs Self-hosted)
- Install and configure extensions
- Set up Typesense backend infrastructure
- Configure Magento admin settings
- Run initial data indexing
- Test search functionality thoroughly
- Implement performance optimizations
- Monitor and maintain system health
Happy Searching! π
Last Updated: 2025 | For the latest updates and advanced configuration options, refer to the official Ceymox documentation and Typesense guides.