PrestaShop
Why rebuilding the index doesn't fix PrestaShop search
· 8 min read · By Ray Rodríguez, founder of Findalo
If you've searched for why your PrestaShop store's search can't find a product, you'll already have hit the standard answer: rebuild the index. Configure → Shop Parameters → Search → "Add missing products to the index", or the button that rebuilds the whole thing.
Sometimes it works. Most of the time it doesn't, and then you're left with no idea what to look at next. This post explains what that rebuild actually does, which things it never touches no matter how often you repeat it, and which of those you can fix yourself this afternoon without buying anything.
Everything below was read in the PrestaShop 8 source, not on a forum from 2017.
What rebuilding the index does
PrestaShop doesn't search over your products. It searches over a word index: two tables, one holding every distinct word in your catalogue and another linking it to the products it appears in, with a weight.
Rebuilding the index means redoing those two tables by reading your catalogue. Nothing more. And from your catalogue it only reads the fields whose weight is greater than zero: name, references, short description, long description, category, manufacturer, tags, attributes and features.
That already explains the first frustrating case. If the long description's weight is zero, that description is not in the index, and rebuilding it a thousand times will keep leaving it out. The index isn't stale: that text was never a candidate.
And a myth while we're here: no, it isn't an OR
It's widely repeated that native search returns anything containing any of your words. You search Funko Ash and you get every Funko and every Ash.
In PrestaShop 8 that isn't the case. Search resolves word by word and intersects the results: search "red car" and you're left with products that have "red" and "car". It's well enough known that the source carries a comment warning that someone broke that intersection in the past and that it mustn't happen again.
If your store behaves like an OR, the problem is something else — usually one of the things below.
The five things rebuilding the index doesn't fix
1. Product visibility
The index only accepts active products whose visibility is "Everywhere" or "Search only". A product set to "Catalogue only" will never appear in search, and no rebuild will change that.
It's the number one cause of "this product exists and doesn't show up". It's on the Options tab of the product page, and you can change it in bulk from the listing.
2. Minimum word length
There's a setting, on that same Search screen, that discards words shorter than X characters. It applies before the index is touched: those words are thrown away, not searched.
If yours is 3, a search for TV searches nothing. A search for kit 4 searches only "kit". And if someone types only short words, search doesn't return zero because nothing matched: it returns zero because there was nothing left to look for.
Dropping it to 2 fixes a surprising number of cases. It has a cost: the index grows and low-value words get in.
3. The ignored-words list
Next to the setting above there's a list of words that are always discarded. It ships with prepositions and articles, which is fine, but it's worth reading: if your catalogue is technical, it's easy for a word that means something to you to be sitting in there.
4. An unknown word doesn't give zero results — it gets dropped
This is the one that confuses people most, and almost nobody explains it.
When you search several words, PrestaShop resolves each one against the index. If one isn't there — neither as typed nor via the fuzzy correction — that word is discarded and the search carries on with the rest.
The practical effect: someone searches running shoes size 43, "43" isn't indexed, and instead of saying "I have nothing like that" you hand them every running shoe you sell. The customer sees a pile of results, none of them what they asked for, and concludes your search doesn't work. You look at your dashboard and see a search that returned results, so you never find out.
It's worse than a zero-result search, because at least zero gets measured.
5. Typo tolerance runs out halfway through the phrase
PrestaShop has fuzzy correction: if a word isn't there, it looks for the closest one in the index. But it has a budget of attempts for the whole query, not per word, and it's consumed as the query goes on.
The consequence is odd to spot and easy to reproduce: in a multi-word search, the early words get corrected and the later ones don't, because the budget ran out before reaching them. The same typo is forgiven at the start of the phrase and not at the end.
So when should you rebuild?
To be clear that it isn't useless. Rebuilding the index is exactly right when:
- You've changed the field weights. The old index was built with the old weights.
- You've added a language.
- You imported products with automatic indexing off, or touched the database directly.
- You migrated version or server and the index tables were left half-built.
On a large store the rebuild runs in batches and can take a while. If it's interrupted, the index is left partial, and there repeating it genuinely helps.
The ten-minute review
If you take only one part of this post, take this one. In order, with nothing to install:
- Take a product that doesn't show up and check its visibility. If it says "Catalogue only", you're done.
- Look at the weights in Shop Parameters → Search. If reference is at zero and your customers search by reference, raise it. If the long description is at zero and that's where the good information lives, decide whether you want it in.
- Drop the minimum word length to 2 and rebuild. Retry the searches that were failing.
- Read the ignored-words list and remove anything that means something in your catalogue.
- Try a three-word search where the last word is very specific. If you get plenty of results and none of them respect it, you've just watched point 4 happen live.
This fixes more than you'd think. Seriously: do it before spending a euro.
What configuration can't fix
And now the honest part, which is where we come in.
Some things don't depend on any setting because a word index can't stretch that far. Searching by meaning rather than by word, so that "something for sensitive skin" finds products containing none of those words. Understanding that a reference with hyphens, leading zeros or a variant suffix is the same one the customer typed. Ordering results by what actually sells rather than by a fixed weight you set once. Showing results as people type. And knowing what was searched for and not found, which is the only list that tells you what you're missing.
That's a different category of product, and it costs money. Our entry plan is €15 a month, and there's a free 1-month trial to see it with your catalogue before deciding.
But if you got here from a search engine, the odds are that what you have is one of the five problems above. Fix that first. If it still can't find what your customers type, then let's talk.
How Findalo works on PrestaShop · Write to us if you'd like us to look at it with your catalogue.
Keep reading
-
Purchase intent: let the search find "the love stone" even if the product page doesn't say so
For every product and in every language, the AI writes the phrases a shopper would use to ask for it: what it's for and what people call it. Real examples from a minerals shop, a medical instruments catalogue in German and a chain of shoe shops. Included from Pro up, with nothing to configure.
-
Free 1-month trial: what's included and what happens when it ends
200 products, 1,000 searches in total and no card. When the month or the searches run out, search stops responding and, if you don't move to a paid plan, the account is deleted 30 days later. What we warn you about, how to continue with Starter or Pro (14-day free trial), and when the trial won't help you decide.