AND or OR? Magento’s Search Types and Search Operators,

In Magento 1.9x there is a way choose alternative search method for the on-site search, how would achieve an ‘AND’ operator for searches in Magento 2?

Here is the solution, (as always recommended backup you system and db prior to making any file changes. also it is always recommended you do not change Magento core files, instead apply this fix by creating an override custom extension/module)

edit search_request.xml
vendor\magento\module_catalog_search\etc\search_request.xml

change <queryReference clause=”should” ref=”search” />

to  <queryReference clause=”must” ref=”search”/>

Leave Comment

//www.expertwebsolutionsinc.com/wp-content/uploads/2020/06/expertwebsoutions-bottom.png