ecommerce
September 2025
Gree Distributor

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.

Duration

6 weeks

Team Size

1

My Role

Search Engineer / Full-Stack Developer

Smart Search Implementation for HVAC Equipment Catalog

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

Search Usage

+900%

Before

Baseline

After

10x higher

Zero-Result Rate

-87%

Before

~40%

After

3-5%

Search Response

Fast

Before

Slow

After

<50ms

Autocomplete

Instant

Before

None

After

<20ms

Content Indexed

+100%

Before

Products only

After

1005 docs

Indexing Speed

Fast sync

Before

N/A

After

~50/sec

The Challenges

Key obstacles that needed to be addressed

1

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

2

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

3

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

4

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

5

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

Our Solutions

How we tackled the challenges and delivered results

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 SynonymsDomain 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 DSLPattern MatchingPHP

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_scoreedge_ngramJavaScript

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

MySQLChart.jsPHPFeature Flags

All solutions successfully implemented and deployed

Results & Impact

Measurable outcomes achieved through our solutions

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

Project delivered on time and exceeded expectations

Technology Stack

Tools and technologies used to build this solution

Database

Elasticsearch 6.7+/7.xCustom AnalyzersSynonym Filtersfunction_score

Backend

PHP 7.1+OpenCart 2.xElasticsearch PHP Client

Frontend

JavaScript ES6Chart.jsAJAX Autocomplete

Database

MySQLCustom Analytics Schema

DevOps

Cron JobsCLI Sync ScriptsToggle Scripts

All technologies were carefully selected to ensure optimal performance, scalability, and maintainability

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.
👤

John S.

CEOGree Distributor

elasticsearchsearche-commercephpopencarthvacautocompleteanalyticssynonymsnlpperformancelegacy-integrationfull-text-search