0

How can I have the default catalog search mechanism search on part of an attribute (in my case - the model attribute)? As it seems out of the box - the search works only on full word, or the beginning of the word - but, if the user enters a middle part of the word - it doesn't find the product

e.g. I have a product named "Samsung Galaxy S7" and the model attribute is "SM-G930F" - I want the search query "G930" to find the product

The weird thing is that in the admin control panel search - it does find it

I understand that the solution has something to do with search_request.xml but I can't find information about this specific case

Any help would be much appreciated! Thanks

0

Native magento uses mysql fulltext search with full match. It build query in file src/vendor/magento/framework/Search/Adapter/Mysql/Query/Builder/Match.php ($matchQuery = ...)

Also you can check ready search extensions which supports wildcard queries (term)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.