By default Magento 2 QuickSearch feature searches for at least one word from the entered phrase in product information. But sometimes it is useful to look for all these words.
Here we describe how to change QuickSearch logic from OR to AND.

Ready module can be downloaded from GitHub:

1. Create a new module.
2. Copy search.xml to the module’s etc folder from vendor/magento-catalog-search/etc.
3. Replace

<queryReference clause="should" ref="search" />


<queryReference clause="must" ref="search" />

4. In command line run

php bin/magento cache:clean
php bin/magento setup:upgrade

Related Post

Docker and Magento: Test and...

In this article, we will describe one of the ways to run Magento 2 on Docker. Docker is a...

Install Magento 2 on Windows...

This article describes one of the ways to setup Magento 2 on Windows or Linux. This...