Gravatar for rdhuyvetters@reference.be

Question by Rik, Aug 29, 2018 2:36 PM

Partial result search not working

Hi,

We have a solution with a lot of products.
They have names like PROD10597, PROD10115, PROD85534, ...

When searching on "PROD", we get all the product pages.
When searching on "PROD10597", we are getting the one product page.

But when searching on "PROD1" or "PROD1*" we get nothing.
'Enable wildcards' is enabled on the searchbox control.

Any hints on where to look?

Best regards,

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Aug 29, 2018 3:25 PM

Enable wildcards option does nothing by itself. It only allows users to type a star character somewhere in their search terms. They can search for `PROD1*`.

Now, the reason why you do not get search results for the `PROD1*` query is lileky that there are more than 32 indexed terms starting with `PROD1`. When there are too many terms starting with the leading characters, Coveo throws an error because that query would be too long and memory intensive to execute.

A search index is not optimized to search characters in words. It is optimized to find complete words.

If you want users to find search results when searching for partial product names/numbers without the star character, you have to index those partial words on your documents in a free-text searchable field.

For product "PROD10597", you could index "PROD10597 PROD1059 PROD105 PROD10 PROD1 PROD" in that field. This will ensure that this document will be returned when a user type any of those variations.

Gravatar for rdhuyvetters@reference.be

Comment by Rik, Sep 13, 2018 1:33 PM

Aparently being in production for a while, the indexer picked up on this and we get partial result.

But we'll keep your suggestion on using the free-text searchable field also.

Thank you for the feedback, @Jean-François L'Heureux

Ask a question