Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Search Problem

 
Search Problem
I keep getting
"Search term is too common"
But its not for common words can I disable this?
or fix whats make this come as an output.

 
Re: Search Problem In reply to
In search.cgi find;

# Set maximum hits -- default to 25.

Below it you will see;

local $maxhits = 25;

Change that to whatever amount you feel fit, e.g. 50.


Andy

webmaster@ace-installer.com
http://www.ace-installer.com
 
Re: Search Problem In reply to
Err Andy - setting the maxhits is nothing to do with it:

This is the bit you need to alter

Code:
# Word is too common, don't try and sort it, can cause problems.
if (($numhits > 50) and (($grand_total * 0.75) < $numhits)) {
return "Search term is too common.";
}
(or just make sure you type in a more detailed query Wink)

Installs:http://www.wiredon.net/gt/
MODS:http://wiredon.net/gt/download.shtml

 
Re: Search Problem In reply to
Oh yeah...DOH!

LOL Blush

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
 
Re: Search Problem In reply to
I still don't understand what do i do to make it stop.

What do I change

 
Re: Search Problem In reply to
In search.cgi find;
Code:
# Word is too common, don't try and sort it, can cause problems.
if (($numhits > 50) and (($grand_total * 0.75) < $numhits)) {
return "Search term is too common.";
}
Change the bit in red to whatever you want, say 100 or something. This will enable them to have up to 100 hits without it giving an error.

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
 
Re: Search Problem In reply to
Is their a way that I can stop
"Search term is too common"
from coming up and disable this.

I want a search to always return a result - NO MATTER WHAT

 
Re: Search Problem In reply to
Comment out the block mentioned in above post:

#if (($numhits > 50) and (($grand_total * 0.75) < $numhits)){
# return "Search term is too common.";
#}

Addendum: Man, I've had (and several lifetimes worth) my fill of all the bickering and blasting. So much that once I've made a certain amount (hopefully in the next 3-5 years), I'm off to the Cook Islands - computer in tow. Once there I'm going to tie an anchor to the computer and 69 it (and the Internet) into the deep blue sea - to Davy Jones locker - maybe with a stick or two of dynamite for good measure. Then retire outright, pina colada by the pitcher in hand. Until then, and to maintain my sanity, I'm retiring from these and all message boards. There's gotta be more to life. And working 7 days a week (including most holidays), usually 16-18 hours a day without a holiday in nearly 2 years, does not make it any better. I'm off my soapbox now [bell rings and scantily dressed girl, placard in both hands, announces round 9999999].


Dan Cool

LotusLand
Vancouver, BC, Canada
Top Ranked City in World for Quality of Life
 
Re: Search Problem In reply to
What does that mean

 
Re: Search Problem In reply to
Dan has just shown you what you need to do.

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

 
Re: Search Problem In reply to
Comment out means to add a hash mark (#) to the beginning of each line you want ignored. Change the code block to the one I provided where the lines are commented out, and the "search too common" check is disabled.


Dan Cool

LotusLand
Vancouver, BC, Canada
Top Ranked City in World for Quality of Life
 
Re: Search Problem In reply to
% = hash
# = pound sign/character

Regards,

Eliot Lee
 
Re: Search Problem In reply to
Eliot you are getting confused with perl.

# is called a hash but in perl % symbolises a hash.

For example, in the UK you would press the "hash" key on your phone, which would be # as there is NO % key!

Pound = £ Wink

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

 
Re: Search Problem In reply to
fine and dandy...but in plain english, the # is a pound sign, which is easier for newbie programmers to understand than stating "hash"...thus, I am NOT confused, I was simply providing user-friendly clarification, PAUL!

Regards,

Eliot Lee