
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: https://github.com/Eleanorsoft/magento2-quicksearch-and
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" />
with
<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...
- July 20, 2017
- By eleanors_admin
- Magento
Install Magento 2 on Windows...
This article describes one of the ways to setup Magento 2 on Windows or Linux. This...
- August 26, 2017
- By eleanors_admin
- Magento
Speed Up Magento 2 DI...
Here we will describe how to improve standard Magento 2 compilation in order to make it...
- November 29, 2017
- By eleanors_admin
- Magento
PayPal error: We can’t...
There is a bug with PayPal checkout on early versions of Magento 2. Users may see error...
- March 12, 2019
- By eleanors_admin
- Magento
Magento2 Mail Logger
This module helps to debug Magento2 emails saving them into a folder as seperate files....
- January 14, 2020
- By eleanors_admin
- Magento
EleanorSoft Became a...
On March 12th, we applied to Adobe Solution Partner Program (SPP) and were approved as a...
- March 15, 2020
- By eleanors_admin
- General