Skip to content
Sign inStart free

PrestaShop

PrestaShop search not working: 8 causes and how to fix them

When a product exists but the PrestaShop search does not find it, the reason is almost always one of a few conditions in the search query. We read the search class of PrestaShop 8.2 (classes/Search.php) and the PrestaShop 8 documentation and list every condition a product has to meet, in the order we would check them.

In this guide

1. The product is not in the search index

PrestaShop does not search your product table directly but a separate search index. The search query only returns products that are marked as indexed, so a product that was imported or changed without being indexed again cannot be found, however good its name is.

Under Shop Parameters > Search, the Indexing section compares the number of indexed products with your catalogue. “Add missing products to the index” indexes only the missing ones, “Re-build entire index” starts from scratch. If indexing on product creation and modification is switched off, PrestaShop gives you a cron URL that rebuilds the index regularly.

  1. Compare the two numbers under Shop Parameters > Search > Indexing.
  2. Click “Add missing products to the index”; after bulk imports, rebuild the entire index.
  3. Switch on indexing when products are created or modified, or set up the cron URL.

2. The product visibility excludes the search

Every product has a Visibility setting with four options: Everywhere, Catalog only, Search only and Nowhere. The search query only accepts products set to Everywhere or Search only. A product set to Catalog only is meant to stay out of the search, for example to avoid many similar variants in the results, and Nowhere hides it everywhere except for customers who have the direct link.

3. The product or all of its categories are disabled

The product itself must be enabled. Less obvious: PrestaShop only returns a product if it is assigned to at least one enabled category. A product that sits only in a disabled category, for example a seasonal category you switched off, disappears from the search even though the product is enabled.

  1. Open the product and check that it is enabled.
  2. Check its categories and make sure at least one of them is enabled.

4. Customer groups cannot see the category

If customer groups are in use, the search also checks the category access of the visitor's group. A product is only returned if one of its categories is open to that group. Products that are only in categories for a B2B or wholesale group are therefore missing for visitors who are not logged in. Test the search in a private window as a guest and once logged in with a customer of the group.

5. The word is too short or on the blacklist

The minimum word length under Shop Parameters > Search applies twice: shorter words are not written into the index, and shorter words in a query are skipped. Model numbers or sizes like “XL” or “A4” can therefore not be found if the minimum is 3.

Blacklisted words are removed from the index and from every query. PrestaShop fills the list by default with common short words of each language. If a product name consists of such a word, remove it from the blacklist of that language and rebuild the index.

6. Typos return nothing

If a query has no exact match, PrestaShop can look for the closest word in the index, but only if fuzzy search is switched on under Shop Parameters > Search. Without it, “hummingbrid” returns no results. Aliases are the second tool: they point a known misspelling to the right word, for example “palyer” to “player”. The most frequent queries are listed under Stats > Shop search, a good place to find misspellings for aliases.

7. Multistore and languages

The index is kept per shop and per language. In a multistore setup, a product must be enabled, visible and indexed in the shop where the customer searches, and the query only uses words indexed in the language of the visitor. If the search works in one shop or language but not in another, check the product in that shop context and rebuild the index there.

When the causes are fixed but customers still miss products

If the index is complete and the settings are right, the built-in search can still miss word parts, several typos in one query or attributes such as colour and size. Then a separate search is worth a test. Grumeria reads PrestaShop 1.7 and 8 stores from their public category pages via https://grumeria.com/api/prestashop-feed?shop=your-shop.com, or from a feed module, and the free Grumeria Search module adds the widget without editing theme files. The feed check shows for free which products Grumeria finds in your store.

Frequently asked questions

Why does the PrestaShop search not find a product that exists?

The search only returns products that are enabled, set to the visibility Everywhere or Search only, marked as indexed and assigned to at least one enabled category that the visitor's customer group may see. Check these points and rebuild the search index under Shop Parameters > Search.

How do I rebuild the PrestaShop search index?

Go to Shop Parameters > Search. In the Indexing section, click “Add missing products to the index” or, after many changes, “Re-build entire index”. You can also call the cron URL shown there regularly.

Why are short words like “XL” not found?

Words shorter than the minimum word length under Shop Parameters > Search are not indexed and are skipped in queries. Lower the minimum word length and rebuild the index.

See what a typo tolerant search finds

Enter your store address in the free feed check and search your own products with typos and word parts.

Check your store

The feed check shows what Grumeria finds in your products and, where possible, the result of your current store search for comparison.

Related guides

See all guides