1

I'm having a strange issue with our website. The issue is that, when I'm searching with some specific keywords like TV, AC, It's not giving me the results and its returning empty results as below though we are having the products related to that keywords.

Your search returned no results

I thought its because of the search keyword length but its not because if I search with different keywords with 2 letters its working fine.

So I have removed the existing query from Search Terms which are AC, TV and created a new with same names but still its returning empty results.

Please guide.

3 Answers 3

0

This is actually a MYSQL DB setting and not Magento. MYSQL only indexes words that are a certain number of characters in length. So 2 would be too short.

Check this thread Magento search less than 4 characters

1
  • we can search with 2 letters for other products except the mentioned letters (or) keywords in question.
    – MagentoDev
    Apr 19, 2021 at 11:37
0

Try setting the Catalog Search Minimal Query Length to 1 or 2 in Stores > Configuration > Catalog > Catalog > Catalog Search > Minimal Query Length

Like So

0

Try to print the sql query from collection then check if its
Like '%search_term_variable%'
Instead of
product_name='search_term_variable';
To print collection you can use it (edit it according to your case)-
echo $products->getSelect()->__toString();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.