Live Search & AutocompleteDocs

Live Search & Autocomplete — Documentation

Everything you need to install, configure and get the most out of real-time product autocomplete on your Magento 2 store.

View as Markdown
Real-time product suggestions in the storefront search bar.
Real-time product suggestions in the storefront search bar.

Installation

Requirements

Magento 2.4.x (Open Source or Adobe Commerce), PHP 8.1–8.5. Works with any search engine Magento supports (OpenSearch, Elasticsearch or MySQL). Compatible with Hyvä and Luma themes. Requires the free codingrow/module-core. No AI provider or API key is needed — the module is pure catalog search.

Setup

Install via Composer, enable the module and run the standard upgrade/compile:

composer require codingrow/module-live-search-autocomplete
bin/magento module:enable Codingrow_LiveSearchAutocomplete
bin/magento setup:upgrade && bin/magento setup:di:compile
bin/magento cache:flush

Then go to Stores → Configuration → Codingrow → Live Search & Autocomplete, paste your license key, set Enable = Yes and flush the cache.

Configuration

All options live under Stores → Configuration → Codingrow → Live Search & Autocomplete.

SettingWhat it doesDefault
License KeyThe license key issued for this domain. Accepts a single-module key or a Codingrow subscription key. The autocomplete does not render without a valid license.
EnableTurns the storefront autocomplete on or off.No
Minimum charactersHow many characters the customer must type before suggestions start.2
Max products shownMaximum number of products in the dropdown.6
Show product imageShows the product thumbnail next to each suggestion.Yes
Show priceShows the price (and any discount) for each suggestion.Yes
Only in-stock productsHides out-of-stock products from the suggestions.No
Use AI Personal Shopper synonymsWhen the AI Personal Shopper module is installed, also use its self-learning synonyms.Yes
Accent colorColor used for prices and the "see all results" link.#2563eb

Uninstall

Set Enable = No to switch it off without removing anything, or remove the module entirely:

bin/magento module:disable Codingrow_LiveSearchAutocomplete
composer remove codingrow/module-live-search-autocomplete
bin/magento setup:upgrade && bin/magento cache:flush

Search & synonyms

How it works

A small, theme-agnostic script attaches to your existing search input (it detects Hyvä and Luma search bars automatically). As the customer types, it debounces the input and asks the module for matching products, then renders a dropdown with a thumbnail, name, price and any discount for each result, plus a "see all results" link to the full search page. Every result links straight to the product page. Results respect product visibility, stock and store scope.

Performance

Suggestions are fetched from Magento's own indexed search engine — the same engine that powers the results page (OpenSearch, Elasticsearch, or MySQL) — via the native quick_search_container request. Because the matching is done by the index and not by scanning the database, response time stays low and does not grow with catalog size. On a live 67,000-product store, suggestions return in about a second and stay flat as the catalog grows.

Extended-field search

Whether the autocomplete searches only the name/SKU or also the description and other fields is controlled by Magento itself, per attribute — not by a module toggle. Under Stores → Attributes → Product, each attribute has a "Use in Search" flag and a search weight. By default name, sku, description and short_description are searchable, so the autocomplete already searches them. To include or exclude a field, or to make one weigh more, change that attribute's search settings and reindex — the autocomplete follows the same configuration as the results page, and stays fast regardless of catalog size.

Tip: raise the search weight of the product name so exact name matches always rank above description-only matches.

Native Search Synonyms

The module always uses Magento's native Search Synonyms. Add or edit them from the standard admin at Marketing → SEO & Search → Search Synonyms; the autocomplete picks them up immediately. When a query returns nothing, the module expands it with the matching synonyms and tries again.

AI Personal Shopper synonyms

If the Codingrow AI Personal Shopper module is also installed (optional, soft dependency), the autocomplete additionally taps its self-learning synonyms registry — the regional, dialect and misspelled terms the assistant has learned from real conversations. This makes even "wrong" searches match the right products. Turn it on with Use AI Personal Shopper synonyms = Yes. Without that module, the autocomplete works perfectly on the native synonyms alone.

Usage

How it appears

The dropdown is injected below your existing search bar and styled to stay out of the way of your theme. Each row shows the product thumbnail (if enabled), the name, and the price with any discount; the accent color (prices and the "see all results" link) is configurable. Keyboard navigation (arrow keys and Enter) and mobile layout are handled automatically.

License

The module uses a per-domain license (a single-module key, or a Codingrow subscription key that unlocks every Codingrow module). The key is verified locally by signature; a revocation check runs at most once a day and is cached, so it never slows the storefront and never exposes your data. The autocomplete does not render without a valid license. Updates are included within the same major version.

Troubleshooting

SymptomWhat to check
The autocomplete doesn't appearMake sure Enable = Yes, the License Key is valid, and you typed at least the minimum number of characters. Then bin/magento cache:flush.
A product that exists isn't foundReindex the catalog search index (bin/magento indexer:reindex catalogsearch_fulltext) and check the product is visible in search and in stock (if "Only in-stock products" is on).
Partial or misspelled words find littleAdd native Search Synonyms, or install AI Personal Shopper for automatic learned synonyms.
Nothing changed after an updateRun setup:upgrade, setup:di:compile and cache:flush after every composer update.