jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => General => Topic started by: mhoney on 09.01.2025 22:38:23

Title: Search Downloads Limited to 100 Results?
Post by: mhoney on 09.01.2025 22:38:23
I am trying to figure out where the limit is defined in the code for the "Search Downloads" feature.  When I search on a keyword that should return much more than 100 results, I only get back exactly 100 results.  Any suggestions?

Marc
Title: Search options
Post by: ColinM on 09.01.2025 23:43:37
Hi,
Presume you are on the Downloads page.  This has a limit set for the number of Downloads to show pper page at the righthand side near the top of the page. When you search it will show that number of Downon loads per page.
At the foot of the page there is a 'page number list'

Hope this helps
Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 10.01.2025 00:00:20
I still only get 100 results.  The search on "GEOS" should return 298 results and the search on "128" should return 1039 items.  You can test this at https://commodore.software/search/search

Here is what I get searching on "geos"

Title: Search
Post by: ColinM on 10.01.2025 11:21:21
Hi
I did a search on https://commodore.software/search/search as you suggested.  It gave a 100 results for both searchs terms.
Seems to me that the "challenge" is with the Commooore software.
In jDownloads are you using Downloads with an External File Link?
Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 10.01.2025 13:35:43
Could you be a little more specific in what you mean by challenge, do you mean the script timing out?  Isn't it odd that it stops exactly at 100 items?  Are you sure this isn't a parameter that can be configured somewhere I haven't looked?  I'm willing to create an override and modify code if I knew where that code was stored.

All my files are stored locally on an NVME drive.

Thanks.
Title: Slow Backend/site
Post by: ColinM on 10.01.2025 15:59:50
Marc
   
 1.  When I went to  https://commodore.software/search/search the search gave 100 items for either search GEOS or 128. 
   To me that means the fault of showing just 100 entries is on the commorde software.
   
2.   You said all your files are on an NVME drive. so I presume you have set the Download files to be on an external drive.  Is that the case?

   I will send you a Private Message (PM) these PMs are secure.
   Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 10.01.2025 22:02:05
PM Received and Replied to.

My server is a VM that is backed by NVME storage, so everything is on NVME.
Title: search limit
Post by: ColinM on 14.01.2025 11:38:56
Marc
After testing there does seem to be a limit of 100 entries when doing a jD front end search.
Will add to 'fix list' to extend to say 250 entries.
Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 15.01.2025 17:40:40
Thank you for looking into this.  Would be nice if this was a configurable parameter, but if not it's not a big deal to edit in the code, just need to know which php file contains the magic number.
Title: Limit of 100 in search
Post by: ColinM on 15.01.2025 18:16:30
Marc
The search shown is the stanard Joomla search - not jDownloads. So there might be some Joomla setup that I do not know about but will look for!!!
Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 18.01.2025 02:14:04
After some more searching, you are right Colin, the limit is imposed by Joomla and people have been complaining about it for years.  Why would Joomla impose such a limit?  What is more strange is that none of my searches has turned up a way to fix it.  There have been comments about changing the number of results per page, but that doesn't change the 100 result limit.  How short sited is this on Joomla's part!?!?  Seriously, any site that has been around for a decade or more will easily have more that 100 results on a keyword.

Please help us fix this!
Title: Limit of 100 in search
Post by: ColinM on 18.01.2025 15:40:09
Marc
The old style search is no longer in Joomla 5 - so I guess that it is now internal in jD. As yet I do not know where!!
Colin
Title: Re: Search Downloads Limited to 100 Results?
Post by: mhoney on 03.02.2025 17:42:27
I found the code that maxes the search results to 100, it's on line 411 of the SearchModel.php in the components>com_jdownloads>src>model folder


$limit      = $this->state->get('search_limit', 100)
Title: Re: Search Downloads Limited to 100 Results?
Post by: ColinM on 04.02.2025 00:07:27
Hi
That is very good info. I have advised Arno and I am sure it will be updated in the next release - have asked that the search lin=mit is a parameter setting in say Frontend-Other Settings.
Title: Re: Search Downloads Limited to 100 Results?
Post by: Arno on 10.04.2025 12:18:03
Hi,
excuse me for the late reply.

I have changed it now in the next release 4.0.47 to maximal 250.

Normally, only the first results (or result pages) are of interest in a search. Otherwise, the search criteria should be narrowed down or made more precise in order to obtain a good result.
But of course there can also be exceptions and therefore I have now increased the value as desired.