cancel
Showing results for 
Search instead for 
Did you mean: 

Search symbol

Search symbol

Hi,

 

Most of my store sku's contain ''-'' symbol like: 210-1543. Currently when I try to search this item in the frontend, I get pretty much anything but that sku.

 

Is there a way to make it accept symbols?

 

Thanks

6 REPLIES 6

Re: Search symbol

Hello @anthony_turcott,

 

Not sure Couldn't understand your words clearly. Can you explain with clarity? which you actually want. 


Best regards
Madhuresan
Bootsgrid

Re: Search symbol

Here are some pictures to explain:

 

Here is what the product look like

 

backend.pngfrontend.png

 

Here is the result of a research if I'm looking for that same SKU:

Quickresult:

quicksearch.png

Full search:search result.png

Re: Search symbol

Magento Mysql search is not that strong so now with 2.3.1 they are offering Elastic search engine inbuilt as another option. For that you need to enable the Elastic search on server and configure it in Magento 2 and you will notice more refine searches.

 

However if you dont have elastic search you can try doing one thing with default Mysql search.If you go to product attributes and check storefront properties for Sku, Name, Description you will notice the search weight is set to 6 for Sku, 5 for namre, 1 for description So whatever you search it will first look into description than to name and than to Sku.

https://prnt.sc/odem3t

https://prnt.sc/oden1r

https://prnt.sc/oden4t

Try setting SKU weight to 1 and reindex,then try searching and let me know if it improved, else we have to go with elastic search.

 

Re: Search symbol

Hi,

 

We are already setup with Elasticsearch 6. The search result in the pictures are from Elasticsearch .

 

Mysql was worse indeed

Re: Search symbol

@mcaashu133 

 

Hi and thanks for your help.

 

This solved 50% of the issue. Learning about search weight helped a lot.

 

I still have the main issue though... Both Mysql and Elastic search don't seem to count ''-'' as a sku character. They will find a sku named ''2101226'' but never ''210-1226''

 

Any idea how I could include that?

Re: Search symbol

Hi It seems that Magento ignores special character so they have a new setting called search synonym 

https://docs.magento.com/m2/ce/user_guide/marketing/search-synonyms.html

 

So you need to put all Sku there without - as a synonym or you need to replace the - from Sku from original import.