Skip to content

Magento 2.4 catalog search search for products by name attribute only

I need the magento search engine to only take into account the “name” attribute to perform the search, could someone help me please?

I found a way to modify the search parameters with the file “vendor/magento/module-catalog-search/etc/search_request.xml”, but I can’t find how to pass it to a module and modify it.

This is original code

enter image description here

This is the code I need to add in a custom module

enter image description here

Thank you for your attention if you help me I will be very grateful