Gossamer Forum
Home : Products : Links 2.0 : Customization :

ban a search word???

Quote Reply
ban a search word???
Hi people.
I have been experimenting with links 2. I have set up the script and built a sample search engine. I have removed all the categories from the search and used url spider pro to index sites. I made the search specific to "cars". so far i have indexed over 1500 pages and have hit a problem. because i have removed the categories the user has to search using the search box and the results appear as they would in a crawling se such as altavista. the search works ok if the user uses a specific search term such as "ford" but if they use a general term such as "car" there is an internal server error. I am not perl literate so i can only guess that this is caused by the scripy not being able to handle so many results... or am i wrong???

is it possible to bann some terms such as car,cars,autos?

over to the experts.

clickforchoice.com a new up and coming web directory and portal
Quote Reply
Re: ban a search word??? In reply to
Its nothing to do with the number of results. You are likely to have made some code errors when customizing the script.

Check your error log.

In a standard version of Links2 you can block terms like:
Code:
@terms = qw( I want to block these words );

foreach (@terms) {
if ($in{'query'} =~ /$_/gi) {
&site_html_search_failure("Term too broad") and return;
}
}
Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: ban a search word??? In reply to
do i insert that into the cfg file?

clickforchoice.com a new up and coming web directory and portal
Quote Reply
Re: ban a search word??? In reply to
In search.cgi just under:

Code:
# Return unless we have results.
((keys %link_results > 0) or ($#category_results >= 0)) or
&site_html_search_failure ("No matching records") and return;
Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com