1

Is there a way to set a max number of search results, so it only shows max 500 producs?

At the moment the search results can contain every single product, so the entire catalog, which is unnecessary a heavy load.

1 Answer 1

1

Commonly, we only retrieve from 10 to 50 products per page in Magento category page. So, I understand you have setup your system to display 500 products?

As for the number of results, if the system displays even 5000, that should not have an impact on the page load as the figure 5000 is a query that counts the number of products for the current category. But in no way, the query fetches product details for 5000 products.

If the above is ok with you, you might want to clarify what you are aiming for. If your category page is slow and you believe it is because either of the scenario above happens to you, then I'd suggest to look into customised code to be code reviewed.

4
  • Thanks Herve! In that case it will not hurt the search, I thought it might slow down the entire search when it shows that much results.
    – JGeer
    Commented Jun 25, 2020 at 12:31
  • np, glad it cuts short this issue for you. good luck with the site Commented Jun 25, 2020 at 12:59
  • Hi Herve, it seems to be a problem during the layered navigation. Because a search phrase can be up to 80K products for example, it also loads the layered navigation for all those products. So any idea how to limit the search results to 500?
    – JGeer
    Commented Jul 1, 2020 at 13:09
  • 80k is a bit much indeed.. you may need something like solr or elasticsearch. Ultimately, layered navigation has to know the whole thing as it is a report.. I'll try to think of something for the shorter term. Having said that, it is contradicting my initial answer.. Maybe we should reopen this question for a wider audience Commented Jul 1, 2020 at 13:17

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.