MEGAKOLYAN Posted December 26, 2014 Share Posted December 26, 2014 Good day, I hope for your help as in other forums there was no answer. There is a shop on prestashop 1.4 standing on a vps server. The store many products ~ 90000, and by using the search an error 504 - Timeout Gate way, I understand - and the fact that the search word many products. And I want to make limits on search results. such as a person entered in the search box the word, and this query produces no more than eg 500 results. Began to pick the file classes / search.php, found a lot of SELECT, most likely I have to find a sampling of indexed words and put the limit of 500, but all attempts were unsuccessful. Help me please - how to solve this problem. Thank you very much. Sorry, my English is bad Link to comment Share on other sites More sharing options...
tuk66 Posted December 29, 2014 Share Posted December 29, 2014 You can limit number of returned records in Search::find($id_lang, $expr, $pageNumber = 1, $pageSize = 1,.... 1 Link to comment Share on other sites More sharing options...
MEGAKOLYAN Posted December 29, 2014 Author Share Posted December 29, 2014 thanks tuk66, i have this string - public static function find($id_lang, $expr, $pageNumber = 1, $pageSize = 1, $orderBy = 'position', $orderWay = 'desc', $ajax = false, $useCookie = true){ How can i do limit 500 products in this function? Link to comment Share on other sites More sharing options...
tuk66 Posted December 29, 2014 Share Posted December 29, 2014 Call find() with $pageSize = 500. Link to comment Share on other sites More sharing options...
MEGAKOLYAN Posted December 29, 2014 Author Share Posted December 29, 2014 Thanks, but again an error 504, so I'm not limited sampling and db - public static function find($id_lang, $expr, $pageNumber = 1, $pageSize = 3, $orderBy = 'position', $orderWay = 'desc', $ajax = false, $useCookie = true) { 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