
tlloancy Catalog Search for WooCommerce is a small WooCommerce product search for shops that do not need a heavy search engine, without giving up relevance.
It builds a compact inverted index in two dedicated tables and answers from a REST route. No external service, no jQuery, about 20 KB of front-end code loaded only on pages that show the magnifier.
What is indexed
- Always: product title, SKU (parent and every variation, with and without separators), product categories and their parents.
- Optional: tags, brands, attribute values (color, size, material…), the first 60 words of the short description.
How results are ranked
Ranking happens in SQL, on the index: an exact SKU comes first, then an exact title word, then a word that starts the title, then prefixes in the title, then categories, brands, tags, attributes and description. Every typed word must match. Ties go to best sellers, then to the newest product.
Typo correction
When nothing matches, the engine looks for the closest indexed word (one letter off, two from seven letters) and searches again. The panel says which spelling the results are for. This can be turned off.
Search UI
- Overlay (default): dimmed backdrop, centered field, close button. Popover: panel under the magnifier, no backdrop.
- Each result shows a thumbnail, the product name with the typed letters in bold, the SKU when that is what matched, the category, and the price. A sale shows the regular price struck through. A variable product shows the price range.
- Arrow keys move through results, Enter opens the highlighted product, Escape closes.
- A “See all N results” link follows when there are more matches than the panel shows.
- Enter in the field goes to the WooCommerce product search results page. With the matching setting on, that page lists the same products in the same order as the suggestions.
- Recent searches (last five) can be shown when the field is empty. They live in the visitor’s browser only.
- The panel follows the on-screen keyboard on phones.
Freshness
A product is reindexed when it is saved from the editor, the REST API, WP-CLI or the CSV importer, when its stock status or visibility changes (including stock reductions from orders), and when a variation changes. Renaming a category, tag, brand or attribute term queues a rebuild. A “Rebuild index” button sits in Settings.
Multilingual
With Polylang or WPML, each product is indexed with its language and the visitor only sees products in the current language.
What it does not do
- It does not count keystrokes — only a commit (Enter, result click, or a stable empty result)
- It does not store IP addresses or WordPress accounts
- It does not call any external service
Insert the Catalog Search for WooCommerce block on the shop / product archive template. Settings live under Settings Catalog Search for WooCommerce.
Privacy
Optional search-term stats (off by default) store normalized queries and counters in a dedicated table. The visitor cookie is a random UUID for deduplication only. Recent searches stay in the browser.