PrestaShop search not working: the index, customer phrases and codes with a hyphen
PrestaShop search not working is most often down to an out-of-date word index, not a fault. The store searches a separate list of words, built when a product is saved. When products arrive by import or from a wholesaler module, that list can be missing. Other causes are search settings, codes with a hyphen and words customers use that are not in your descriptions.
Author: The TellMyShop team. A guide for PrestaShop store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 6 min read
How does PrestaShop search find products?
It searches the index, not the live catalogue. When a product is saved, PrestaShop splits its name, reference, descriptions, category, brand, tags, features and attributes into single words. Each word gets a weight that depends on the field it came from. When a customer types a phrase, the store compares it with this list and sorts the results by the sum of the weights.
Three things follow from this. A product that did not go through a normal save may have no words in the index. A word that is not in any field will not find the product, even if the customer is right. A field with a low weight loses to another product's name. All the settings are described in the search parameters documentation.
How to tell which part of the search is failing
By what exactly the customer sees. Check it in a private browser window, without logging in to the admin.
| Symptom | Most common cause | What to do |
|---|---|---|
| No phrase finds anything | empty or damaged index | full index rebuild |
| New products do not appear, older ones do | products added by import without indexing | add the missing products to the index |
| Code “LG-2041” finds nothing, “LG” finds dozens | the hyphen splits the code into parts | test a few spellings, an alias or the code in the name |
| A customer's typo gives zero results | no fuzzy search and no aliases | aliases for common mistakes |
| The right product is on page three of the results | field weights, word only in the description | the word in the name or a change of weights |
| One product does not appear, the rest work | visibility set to “catalog only” or missing from the index | diagnose that product |
The last row is about a single product. We describe the full list of reasons products disappear in the post product not showing in the store.
How to rebuild the search index step by step
A rebuild takes a few clicks and does not change product content.
- In the admin, open Shop Parameters > Search.
- In the indexing section, check the number of indexed products and compare it with the number of active products in the catalogue.
- If a few are missing, choose to add the missing products to the index.
- If many are missing or the index is empty, run a full rebuild. With a large catalogue, do it outside busy hours.
- If you run an automatic import every night, copy the indexing task address and pass it to whoever looks after the server.
- Type three phrases into the store that did not work before and note the result.
If the results are still old after the rebuild, the cache may be to blame. That is covered in the post PrestaShop changes not visible.
Why can't customers find a product by a code with a hyphen?
Because the index splits text into words, and a hyphen is sometimes treated as a word boundary. The code “LG-2041” may end up in the index as “LG” and “2041”. The customer types the whole code, and the store looks for different words from the ones it has stored. The problem is described in detail in Pro-Link's guide to PrestaShop search (in Polish).
The minimum word length works in a similar way. Words shorter than the set minimum never get into the index at all. A size like “XL” or a series like “A4” can therefore vanish from results. There are also known indexing bugs. For example, words separated in a description by a line break can get glued into one, as described in this PrestaShop GitHub issue.
What you can do without a developer:
- Test the code in three spellings: with a hyphen, with a space and joined up.
- Turn on the option to search within words in Shop Parameters > Search and compare the results.
- Add an alias for the spelling your customers use.
- For technical products, put the code in the name or the short description as well.
Baymard's research on ecommerce search query types shows that searching for abbreviations and symbols causes trouble for many stores. It is not just a PrestaShop quirk.
How to set field weights and aliases so the results make sense
Start with the default weights and change them only when the results are clearly wrong. By default the product reference and name weigh the most, and descriptions the least. That is a sensible setup. If customers search by material or use, and those words are only in the descriptions, it is better to add them to the name. Raising the weight of descriptions changes results across the whole store.
Aliases are a list of corrections for common mistakes. You enter “lantren” and point it to “lantern”. You will find phrases for aliases in the shop search statistics, where words with zero results are listed. An example of this kind of problem is this forum thread about search not working (in Polish).
How the chat checks why a phrase does not find a product
You give the phrase and the product that should appear. Your chat (Claude or ChatGPT) checks whether the product is active, visible in search and present in the index, and in which fields the searched word appears. This diagnosis only reads data, so it works in TellMyShop Free.
You: Why does the search not find “lantern LG-2041”? The product exists and opens from a link.
Your chat: I have checked the product Nora lantern 30 cm (reference LG-2041). It is active, visible everywhere and in the index.
The word “lantern” is only in the long description, and the name is “Nora 30 cm black”. The search may split the hyphenated code into parts.
You: Show me a preview for all lanterns without that word in the name.
Your chat: Preview: 14 products, only the name changes. I'll save it after your ‘yes’, and each save will refresh the index for those products.
I suggest adding the product type to the name:
old version: Nora 30 cm black
new version: Nora lantern 30 cm black
TellMyShop Pro saves changes to names and descriptions in batches of up to 50 products, and each batch can be reversed from the change history. You rebuild the whole index and set weights and aliases yourself in the admin. The chat changes store settings only after you turn on the Service switch, which you turn on separately for 3 hours. A ready example request is search does not find a product. If the problem is weak descriptions across the whole catalogue, see the post on bulk editing product descriptions.
Questions and answers
Why does the search find nothing, whatever phrase I type?
Most often the search index is empty or damaged, for example after moving the store or after an import. In Shop Parameters > Search, check how many products are indexed. If the number is zero or much lower than in the catalogue, run a full index rebuild. If that does not help, look at the error log.
Can rebuilding the search index harm my store?
It does not change products or their content. A rebuild only rearranges the list of words the search uses. With a large catalogue it takes longer and loads the server, and results may be incomplete while it runs. So run it in the evening or at quiet times, not in the middle of a promotion.
How can I see what customers search for in my store?
PrestaShop records the phrases typed into the search in Stats, in the shop search report. You can see the words and the number of results. Phrases with zero results are a ready-made list to fix: you add typos as aliases and add missing words to product names or descriptions.
Should I buy a search module instead of using the built-in search?
With a few hundred products, a well set up built-in search is usually enough: an up-to-date index, sensible field weights and aliases. A module with fuzzy search and suggestions makes sense for a large catalogue or many technical codes. Before you buy, check whether the problem lies in the index or in the product content.
Who rebuilds the index when you use TellMyShop?
You do, in the admin. The module has no separate command for it, and the rebuild button is in Shop Parameters > Search. In TellMyShop Free the chat checks whether a specific product is in the index and why it does not appear in results. In TellMyShop Pro it improves names and descriptions, and each save refreshes that product's index.
PrestaShop is a registered trademark of PrestaShop SA. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.