I am trying to limit the search results returned when doing a product search. The client wants to return only one option at a time. This is because their customers know the skus and dont want to see all the other skus that are similar.

By searching this way they will get an exact search. I found the search_result.xml file that if I update to 1 in the size I achieve my result.

The problem is I know not to edit inside the vender/magento files. How do a make this file to override it. Where do i begin as I am new to magento.

I understand how the theme files overwrite design things. However this is a backend thing. I would also like to add code that will show if no results are found to display something like we are currently out of stock.

1 Answer 1


Not sure if you figured this out already, but why not redirect that search term to the specific product page? Go to Marketing>SEO and Search>Search Terms, find the appropriate Search Query and Click "Edit" in the "Action" column and enter a redirect URL to the appropriate product page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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