hyrrad Posted June 1, 2021 Share Posted June 1, 2021 (edited) Hello. I have a problem with my products search results. for example if i search "5010", the result will be products that have "5010" in their name. but if i search for example "battery 5010" the result will be products that have "battery" OR "5010" in their name. but I want products that have "battery" AND "5010" in their name. How can I achive this? ------------------------ I use Prestashop 1.6.1.24 Edited June 1, 2021 by hyrrad Added Prestashop version (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted June 1, 2021 Share Posted June 1, 2021 5 hours ago, hyrrad said: but if i search for example "battery 5010" the result will be products that have "battery" OR "5010" in their name. but I want products that have "battery" AND "5010" in their name. This is how Prestashop works. For another approach you need a module. Try to find one that uses Elasticsearch. Link to comment Share on other sites More sharing options...
hyrrad Posted June 1, 2021 Author Share Posted June 1, 2021 thank you for your response but is there any way that i can achieve this by changing database query and where should i change it? Link to comment Share on other sites More sharing options...
musicmaster Posted June 6, 2021 Share Posted June 6, 2021 Newer versions and Thirty Bees work better. The search is done in /classes/Search.php in the function find() in the largest query. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now