-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento 2.2.6 Searching for product with dash doesn't work #21059
Comments
Hi @DeLuuk. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @DeLuuk do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento-engcom-team I can't reproduce this on a vanilla instance since the "vendor/magento/module-catalog-search/etc/search_request.xml" needs to be changed first. I know that that would maybe mean it isn't a vanilla bug but in my opinion editing that clause should be possible and should work. |
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
HI @DeLuuk thank you for you report, this will fixed by this pr -> #20727 |
@DeLuuk
https://dev.mysql.com/doc/refman/8.0/en/fulltext-fine-tuning.html |
@magento-engcom-team thanks for linking other issue but Im still having trouble. I want to be able to search for "A-327" not just "A-". Like I said in the reproduce steps, this isn't just a vanilla Magento 2.2.6 enviroment. I edited "vendor/magento/module-catalog-search/etc/search_request.xml". If I reverse does changes then it works. But I want to keep those changes since I dont want my search query to work with OR but with AND. And those changes aren't made in pr -> #20727. So if I can I'm reopening this since it isn't fixed. |
@engcom-backlog-nazar can this issue be opened again? |
@DeLuuk i'm will recheck, this must be environmental issue |
@DeLuuk yes this is non-issue after i apply changes from pr and set -> #21059 (comment) |
@engcom-backlog-nazar but now change:
to
And see what happens then |
@engcom-backlog-nazar oke in that case Im gone try editing that option file. Where can I find that option file? The url you linked is just for MySql specific, not Magento specific. I mean I can't put that in a .htaccess or something? |
@DeLuuk you on ubuntu ? this is in mysqld
then restart mysql server |
@engcom-backlog-nazar is that server wide? I have my test shop on the same server as the live shops. So I want to be sure that I dont break anything |
@DeLuuk this will affect for all websites if they use same server. try to test this locally. |
@engcom-backlog-nazar I have CentOS not Ubuntu. Also I know Im asking a lot of questions and this isn't support but how can I test it locally.. 😅 |
@DeLuuk in centOS this file in ->
|
Oke @engcom-backlog-nazar Im gone have to believe you on your word then since Im not adding this for the live just yet!! Im gone push it live next tuesday morning so I'm hoping this is gone work!! Thanks for answering all my questions! |
@DeLuuk your welcome, But also add changes from reference Pull Request. |
@engcom-backlog-nazar Yes I realise that thanks!! Will do 😄 |
@engcom-backlog-nazar Oke I just changed the files to match this commit and added this to
But I still can't search for "A-327". |
@DeLuuk wrong commit you simply need add "-" to this -> |
@engcom-backlog-nazar the reason I did the other commit is because that commit was already in my Magento 2.2.6 environment. |
@DeLuuk ok thanks, give me 5 minutes i'm will recheck, because i'm migrated to archlinux :) |
@engcom-backlog-nazar I see. I noticed that thats a 2.3dev environment. Does this also work on a 2.2.6 environment? |
@DeLuuk hm.. try change to |
@engcom-backlog-nazar yeah but that's the whole point! That would indeed work. But then if customers search for "Blue boots" they get all the products with "Blue" or "boots". My client wants to only show products that have "Blue" and "boots". That way the search results go from 300 to 20. |
@DeLuuk yeap, i'm found the problem this works for skus like this 41-315 but does not for sku like yours A-315 |
Oke @engcom-backlog-nazar but now what? Can this be fixed or is it already fixed somewhere? Or? |
@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 The core problem in Mysql because they have not ability to set min_search_world to =1 , your select is |
@engcom-backlog-nazar oke so you're saying that for it to work you need to be able to search for 1 character? What do you suggest? Is there a fix for this? |
@DeLuuk this is Mysql bug https://bugs.mysql.com/bug.php?id=2095 |
@DeLuuk here is another workaround. It was recently added to the manual: |
@engcom-backlog-nazar Oke and I'm guessing you have to use the true_word_char() macro when you sent the string to mysql? But again thanks for helping me so far! |
Any solution in Magento 2.2.6 ? I am still facing this issue |
@Puru2016 in the end I didn't get it working with standard Magento 2 unfortunately. I did however install this extension that made it work. https://mirasvit.com/magento-2-extensions/sphinx-search-ultimate.html |
Thanks for pointing it out. Mirasvit extension works for me as well. |
Preconditions (*)
Steps to reproduce (*)
to
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 (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: