cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for a specific item/SKU number brings up a completely different product

Searching for a specific item/SKU number brings up a completely different product

Apologies if this is the wrong subforum, I'm pretty new here! I know this is where code-related questions go, and it might be an issue with the coding, but I really have no idea. Please let me know if I should repost this under the correct forum, and which one that would be, if it's in the wrong place.

 

Basically, I have an item which has an SKU number that is 4140. Normally searching an item number should either pull up the direct page it belongs to, or at least pull up only that item as a list of possible matches for the user to click on. (I would prefer it do just the former, but I'll ask about that on another thread.)

 

However, this one pulls up the direct page for a totally different product whose SKU number is 4135. I know the 4140 product exists, because I can find it by searching for its name or looking at what category it's organized under, and can view the page just fine. But for some reason, searching the SKU number leads to the wrong thing.

 

I suspect it has something to do with redirects, but I don't know how to fix it without making #4135 unsearchable instead.

 

Thanks in advance for any advice. 

2 REPLIES 2

Re: Searching for a specific item/SKU number brings up a completely different product

Hi @KitiKatica 

 

Welcome to the forums.

 

There could be many reasons why you get wrong matches when searching for your product. By default Magento uses a fairly basic MySQL fulltext search to match your query. This searches through a ton of data that you have decided should be indexed.

 

The data is located in the table: catalogsearch_fulltext

 

You can check the rows matching and you should find a matching text for these rows, which should reveal why they match.

 

However if you want to redirect your users directly to a product matching the SKU, you could use an event on the catalogsearch result index page. 

 

If you however don't have many products and can handle doing all the work, you can set a up a redirect page for any Search query from the admin via:

 

Catalog > Search Terms

 

I hope this helps :-)

Re: Searching for a specific item/SKU number brings up a completely different product

I'm confused. I am trying to search by sku and I'm getting no results no matter what I tried. Am I supposed to see the "sku" column listed in the catalogsearch_fulltext table?

If yes, how can I get it to be in there?