magento2: Magento 2.2.6 Searching for product with dash doesn't work
Preconditions (*)
- Magento 2 version 2.2.6
Steps to reproduce (*)
- In “vendor/magento/module-catalog-search/etc/search_request.xml” change
<query xsi:type="boolQuery" name="quick_search_container" boost="1">
<queryReference clause="should" ref="search" />
<queryReference clause="must" ref="category"/>
<queryReference clause="must" ref="price"/>
<queryReference clause="must" ref="visibility"/>
</query>
to
<query xsi:type="boolQuery" name="quick_search_container" boost="1">
<queryReference clause="must" ref="search" />
<queryReference clause="must" ref="category"/>
<queryReference clause="must" ref="price"/>
<queryReference clause="must" ref="visibility"/>
</query>
So that the search query “blue boot” only shows products with both the words. 2. Add a product in the back-end with a name with a dash (-) in the name. For instance “Lakboot Black Mat New A-327 N118” in my case 3. On the frontend search for that product. So with my example you would search for “A-327”. 4. Now when you have the search clause for must nothing is going to show up.
Expected result (*)
- You would expect the product to show up
Actual result (*)
- There are no results found
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (2 by maintainers)
@DeLuuk i will recheck it deeper this may be related to minimal search words, but anyway i’m will reopen this if have no solution and this caused by magento
@DeLuuk in centOS this file in ->
/etc/my.cnfadd after [mysqld]