Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Limit the number of results

Quote Reply
Limit the number of results
Hello!

Is there a way to show, for example, only 10 results when searching though there are more results than that number? In other words, to display only a limited number of results from the database?

The reason is quite simple - sometimes the number of results exceeds the number of links that the user is ready to view and it generates unnecessary time to view the result.

Many thanks in advance.
Quote Reply
Re: [katakombe] Limit the number of results In reply to
Hi,

As far as I know, there is no way to do this (without editing the main codes)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Post deleted by nir In reply to
Quote Reply
Re: [Andy] Limit the number of results In reply to
Hello Andy!

Unfortunately, because the measurements show a greater time required to print the largest number of results for the same database.

Today it is possible to restrict only the number of results on each page, but not the total number of results.
Quote Reply
Re: [katakombe] Limit the number of results In reply to
Sure, check out Setup > Search Options - I think the option is called search_max_hits.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Limit the number of results In reply to
Andy wrote:
Sure, check out Setup > Search Options - I think the option is called search_max_hits.

Cheers

Yea - "search_maxhits", on every page, but not the total number of the results .. Angelic
Quote Reply
Re: [katakombe] Limit the number of results In reply to
Oh sorry, I thought thats what you were asking (just re-read your post, and you were telling me thats what can be done already :))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Limit the number of results In reply to
He he .. no problem, thanks a lot anyway Andy Smile
Quote Reply
Re: [katakombe] Limit the number of results In reply to
I don't think there is any direct method for doing this, however you can use if/elseif condition to limit the results.

For example if you want to display only 120 results in total & you are showing 25 results per page..
than using if/elsif condition, you can set the pagination to not display next page link for 5th page

Also,
@ using similar conditions, you can customize display for each search query, type of query or all query..
@ using if/elsif condition, you can display total result output and when total result output is more than 120.. you can display 120 instead or message like 120 of 2000 results displayed.

Hope this helps.

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Limit the number of results In reply to
Very interesting, indeed. Currently I am busy but I will try as soon as possible. Thanks for the advice SmileCool