View Full Version : Search result pagination
sp33d
12-10-2007, 02:07 AM
Would it be possible to paginate search results similar to the full gallery list? Some of our searches return a large number of results and we'd like to be able to display all of them...
I imagine we can. I need to paginate the gallery halls too. My motorcycle forum hall is huge.
sp33d
12-10-2007, 06:37 PM
Wow, you do have a couple users with a lot of galleries there. We limit our users to five galleries each. I had never thought of giving them more. At 50 images each that's a lot of images for one user.
Our biggest problem is the site is pretty specific in what it caters to which means most of the galleries are for similar vehicles. I did some maintenance the other night to drop out all galleries with no images and we still have 5,500 of them so searches typically return 500+ results.
I browsed through the code last night and it looks like it'd be very simple to do since you already have the code for pagination in the file for the normal list. One could even make the search results sortable similar to the list with a short amount of effort I believe.
The problem is the overhead that where combined with order put on a query. I have to do this carefully.
But yeah, the code is there, it's mostly copy and paste to build it. I'll mock up some queries and run them through explain to optimize them.
I got hit with some things I have to deal with in the next few days, a command performance that has nothing to do with the web or my work. So, this won't happen overnight. But once I dig in, I'm sure we'll bang most of it out in that day.
Then, you can have the pre-release and see how it works on your huge user base.
Most of the huge galleries are me. I pump 100 or more photos into the db with the mass upload utility in the utilities folder. Yet another undocumented tool I threw in. It needs the gallery to exist though. I plan to add code to create galleries in other user names for admins in the near future.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.