Case studiesE-commerce
Smart Search Implementation for HVAC Equipment Catalog
Transformed MySQL LIKE search into Elasticsearch-powered engine for HVAC e-commerce. Increased search usage 10x, reduced zero-result queries from 40% to 3-5%, enabled cross-content search across products and articles.
- Client
- Gree Distributor
- Duration
- 6 weeks
- Team size
- 1
- Published
- September 2025
- Role
- Search Engineer / Full-Stack Developer

Executive summary
The client's HVAC e-commerce store running on OpenCart 1.5.6.4 had a critical problem: their search didn't work. Built on MySQL's basic %LIKE% operator, it only performed exact string matching. A search for "quiet air conditioner" returned zero results because products were described as "silent" or "low-noise". Users searching for "12k BTU" found nothing because products listed "12000 BTU".
With 800+ climate control products and growing, every failed search was a lost sale. The business had no visibility into what users searched for, which queries failed, or how to improve. Seasonal traffic spikes made the situation even more critical—peak summer demand meant maximum search volume on a fundamentally broken system.
We implemented Elasticsearch with HVAC-specific intelligence: custom synonym dictionaries for industry terminology, morphological analysis for word variations, smart query processing that understands room sizes and BTU ratings, and a business-aware ranking system. The result was a 10x increase in search usage and an 87% reduction in failed searches—users could finally find what they needed.
Key metrics
| Measure | Before | After | Change |
|---|---|---|---|
| Search Usage | BeforeBaseline | After10x higher | Change +900% |
| Zero-Result Rate | Before~40% | After3-5% | Change -87% |
| Search Response | BeforeSlow | After<50ms | Change Fast |
| Autocomplete | BeforeNone | After<20ms | Change Instant |
| Content Indexed | BeforeProducts only | After1005 docs | Change +100% |
| Indexing Speed | BeforeN/A | After~50/sec | Change Fast sync |
The challenges
Primitive MySQL LIKE Search Without Morphology
The original search relied on MySQL's basic %LIKE% operator—only exact substring matching. No stemming meant "air conditioners" wouldn't find "air conditioner", and "cooling" missed "cool"
Business impact. A search for "quiet air conditioner" returned zero results because products used terms like "silent" or "low-noise". Users had to guess exact terminology
HVAC Technical Jargon Not Recognized
Industry-specific terminology caused constant mismatches: "12k BTU" vs "12000 BTU", "mini split" vs "ductless AC", "gre" typos vs "Gree" brand, metric vs imperial measurements
Business impact. Users had to guess the exact terminology used in product listings, leading to frustration and site abandonment
Products-Only Search Missing Content
Legacy OpenCart 1.5.6.4 system only searched products, ignoring valuable blog articles about installation, maintenance guides, and information pages
Business impact. Users searching "AC installation guide" found nothing, even though the site had comprehensive installation documentation
Zero Search Analytics
No mechanism to track search queries, failed searches, or user behavior patterns. Business had no visibility into what customers actually searched for
Business impact. Unable to identify popular products, missing terminology, seasonal trends, or which queries returned zero results
Performance Issues at Scale
As catalog grew to 800+ units across categories (wall-mounted, ducted, cassette, VRF, chillers), MySQL LIKE queries became increasingly slow
Business impact. Multi-field searches across name, description, attributes, and SKU caused noticeable delays during peak summer traffic
The solution
Elasticsearch with HVAC-Tuned Analyzer
Deployed Elasticsearch 6.7+ with custom analyzer pipeline: Standard Tokenizer → Lowercase → English Stemmer → HVAC Synonym Filter. Unified index stores products, articles, and pages with document_type filtering
Implementation
Index config: 1 shard, 1 replica, 30s refresh. Pipeline ensures "conditioner/conditioners/conditioning" all match. Integrated with OpenCart 1.5.6.4 without modifying legacy codebase
- Elasticsearch 6.7+
- PHP 7.1+
- OpenCart 1.5.6.4
Comprehensive HVAC Synonym Dictionary
Extensive synonym mappings: brand variations, 16+ Gree product series, BTU/kW conversions, technical features (inverter, wifi, quiet), room types, and efficiency ratings (SEER, EER)
Implementation
"ac, air conditioner, aircon" → equivalent; "mini split, ductless, wall unit" → equivalent; "7k btu, 7000btu" → 7000 BTU; "1 ton" → 12000 BTU; "quiet, silent, low noise" → equivalent
- Elasticsearch Synonyms
- Domain Analysis
Intelligent Query Processing
Smart query parsing: area-based ("300 sq ft"), noise level ("quiet for bedroom"), Gree model series ("GWH12", "Bora"), promotional ("sale"), and negative queries ("not inverter")
Implementation
Area search converts units, filters by room_size. Noise queries boost 18-25 dB models up to 300x. Series detection recognizes prefixes like GWH, GUD, FGR and maps to product families
- Query DSL
- Pattern Matching
- PHP
Business-Aware Scoring & Autocomplete
function_score combining text relevance with business metrics (popularity, inventory, seasonal boosts). Real-time autocomplete with edge_ngram returns 8 suggestions in <20ms
Implementation
Popularity via field_value_factor. Inventory penalty: out-of-stock 0.2x. Seasonal: summer 1.5x for cooling. Autocomplete shows name, series badge, price, availability
- Elasticsearch function_score
- edge_ngram
- JavaScript
Analytics Dashboard & Failback
Admin dashboard tracking queries, zero-results, processing times. Automatic MySQL failback if Elasticsearch unavailable. Toggle script for instant switching without deployment
Implementation
search_analytics table with indexed columns. Dashboard: period filters, top queries, zero-result flags, ES vs OpenCart comparison, CSV export. Toggle via toggle_search.php
- MySQL
- Chart.js
- PHP
- Feature Flags
Results and impact
User Experience
Search that actually works
Users can search naturally—"quiet air conditioner for bedroom 300 sq ft" returns relevant quiet models for appropriate room sizes. Typos like "gre invertor" correctly match Gree inverter models
Business Intelligence
Data-driven search optimization
Owner has visibility into what customers search for. Zero-result queries are flagged—leading to discoveries like adding "tonnage" understanding (1 ton = 12000 BTU) and regional terminology
Content Discovery
Cross-content search
Search for "installation" surfaces installation service pages and blog articles alongside products, increasing engagement with content marketing investment
Reliability
Zero downtime risk
Failback mechanism means search never goes down. If Elasticsearch has issues, automatic fallback to MySQL. Toggle script allows instant switching without deployment
Future-Ready
ML-ready architecture
Document structure includes description_vector field (768 dims) for semantic search embeddings. User segment classification enables future personalization
Product Discovery
Series-aware search
When users search "GUD140" or "bora wifi", system returns appropriate products. If specific model unavailable, similar models from same series/power range are suggested
Technology stack
- Database
- Elasticsearch 6.7+/7.x
- Custom Analyzers
- Synonym Filters
- function_score
- Backend
- PHP 7.1+
- OpenCart 2.x
- Elasticsearch PHP Client
- Frontend
- JavaScript ES6
- Chart.js
- AJAX Autocomplete
- Database
- MySQL
- Custom Analytics Schema
- DevOps
- Cron Jobs
- CLI Sync Scripts
- Toggle Scripts
“Before implementing this search system, our site search was practically useless—customers would contact support with questions that search should have answered. After deploying Elasticsearch, we saw for the first time that people actually use search. The ability to search by room size was especially valuable—that's the most common question our customers have. The analytics dashboard helps us understand what's missing from our catalog and what terminology we need to add.”
- elasticsearch
- search
- e-commerce
- php
- opencart
- hvac
- autocomplete
- analytics
- synonyms
- nlp
- performance
- legacy-integration
- full-text-search
Tell me where things are stuck.
A 30-minute call. You leave with a clear next step, whether or not we work together.
I reply to every message within 24 hours.