Search in Joomla Returns Only 50 Results

If you perform a search on your regular Joomla website, you will notice that the search results will only display a maximum of 50 matches, even though you might have more. So, why is that and how to fix it?

To answer the “why” part of the question, Joomla is a heavy CMS, and, obviously, its developers know that. That’s why they put a default limit of 50 on search results, so that the search results page won’t run out of memory and/or won’t timeout on large websites with more than 10k articles.

Fixing the problem is extremely simple, and can be done the following way:

  • Login to the backend of your Joomla website.
  • Go to “Extensions” -> Plugin Manager.

  • Type in “Search – Content” next to filter and press the Enter key.

  • Click on the Search – Content plugin (it should be the first match).

  • Under basic options on the top right, change the value of Search Limit from 50 to the number of your choice. Note that a high number can cause performance/timeout issues on your website, so be careful.

  • Click on Save on the top right. That’s it!.

We highly recommend that you test the search functionality on your Joomla website after changing the above value and to see if the search has become slow. If this is the case, then try with a lower number until the search speed becomes acceptable.

There are ways to substantially optimize Joomla’s search functionality but they require some changes in its core. If you really want to go this way, then what you need to do is to modify the search query in such a way that it only returns the IDs of the rows matching your search criteria, and then, in your view, you will need to run a query for each and every item displayed to get the rest of the information. This ensures that a huge search won’t inundate your server’s memory with unnecessary information (such as the title, the introtext, the author’s information, the published date, etc…) about rows that are not displayed on the served page.

You can also speed up the search by eliminating unnecessary joins from the query (again, this requires modifications in Joomla’s core).

The last part of this post is highly technical, and if you need help implementing it, then please contact us. We have enhanced Joomla’s search functionality on many sites so far and we can definitely do the same with yours. Our fees are affordable, our work is professional, and we are the most reliable developers on this planet. Oh, and we are extremely friendly too!

No comments yet.

Leave a comment