Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search exclusion

Quote Reply
Search exclusion
Is there a feature in Links SQL search to exclude common words? For example is somebody searches "Microsoft SQL seminars in october "I would like word "in" to be excluded, so users don't get all categories and links which have letters "in" included (and there is usually a lot of those).

Thank you

Z
Quote Reply
Re: [Z] Search exclusion In reply to
I think that is pretty much automatic with stopwords - common words will not be included.

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Search exclusion In reply to
Not in my case. I checked some other Links SQL sites and when I type for example "in" I get not results. When I type "in" on my site I get all categories, sites and description which have word in included in any word. So you can imagine how my search results looks like.

Does anybody know answer to this question?
Quote Reply
Re: [Z] Search exclusion In reply to
Have you indexed your database (Internal for example?)
Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Search exclusion In reply to
Yes I did and it works just fine now.

Thank you
Quote Reply
Re: [Z] Search exclusion In reply to
Aki posted this awhile back: http://www.gossamer-threads.com/...i?post=205064#205064

It *seems* though, that the derived classes are overriding the base class, with some things, so it might be buggy.

What I mean, is that the specific derived class sets:

$ATTRIBS = {
min_word_size => 4
};


Which would appear to override the settings in the base class. I may be wrong about this, since I have not traced it all through, but it looks like the stop words list includes 'in' etc.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Search exclusion In reply to
I have another question now. Search results are resulting categories and links which is what I want. The problem is that sometimes there is no results in categories so I have categories showing up with nothing and than I have links results.

For example: Search->news result category: news links: list of links

Search->cnn result category: blank links: list of links

In Google directory if I try the same example I will get:

Search->cnn result category: News links: list of links

I hope I'm not confusing the hell out of everybody.

Z
Quote Reply
Re: [Z] Search exclusion In reply to
So you have a number of empty categories or? And you dont want empty categories to show up in search results?

- perhaps easier if we could see an example on your site..

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Search exclusion In reply to
I don't want empty categories to show up in search results?
Quote Reply
Re: [Z] Search exclusion In reply to
Let me try again.

Example one. News is showing in categories. That is how it is suppose to be.


Thank you

Z[/size][/black][/font]

Last edited by:

Paul: Feb 2, 2003, 11:16 AM
Quote Reply
Re: [Z] Search exclusion In reply to
Sorry I've had to edit your post it was bringing up a password authentication box due the the html you pasted from the remote website.
Quote Reply
Re: [Paul] Search exclusion In reply to
No problem. It was my fault anyway.

Example one: Search word was news. It returned news category and 3 links.

Your search returned 1 categories and 3 Links.

Categories News


Web Pages


CNN news - http://www.cnn.com
Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news.


Abc news - http://www.abc.com
Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news.


ABC news - http://www.abc.com
News site. Just another news site.News site. Just another news. News site. Just another news.News site. News site. Just another news site.News site. Just another news. News site. Just another news.News site.

Example two: Search word was cnn. It returned 0 categories and 3 links.

Your search returned 0 categories and 3 Links.

Categories

Web Pages


CNN news - http://www.cnn.com
Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news.


Abc news - http://www.abc.com
Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news. News site.Cnn news.


ABC news - http://www.abc.com
News site. Just another news site.News site. Just another news. News site. Just another news.News site. News site. Just another news site.News site. Just another news. News site. Just another news.News site.

So first example is ok because I have category returned in search results. In the second example the problem is that title category is still there but it is empty. Is it possible if search results returns 0 categories not to display category title at all.

Thank you

Z
Quote Reply
Re: [Z] Search exclusion In reply to
If you're talking about not wanting the "Categories" section showing up when you don't have any category matches, that's not problem. Just edit your search_results.html template and do something like:

Code:
<!-- Categories -->
<%if category_results%>

<!-- Category section here -->
<%category_results%>

<%endif%>


<!-- Links -->
<%if link_results%>

<!-- Link section here -->
<%link_results%>

<%endif%>

Sean
Quote Reply
Re: [SeanP] Search exclusion In reply to
Thank you Sean.

For some reason I removed that part of the code.

Z
Quote Reply
Re: [klauslovgreen] Search exclusion In reply to
Pleas can you give me a hint: I didn't find anything about stopwords (using LinksSQL 2.1.2)

Thanks, Christian
Thanks a lot for your help,
Christian

Quote Reply
Re: [cwschroeder] Search exclusion In reply to
Just use this global and your problems are gone... I think there's already a call to ignored in the search templates so just adding this Global will do.


Code:
sub {
require GT::SQL::Search::MYSQL::VER4;
my $STOPWORDS = $GT::SQL::Search::MYSQL::VER4::STOPWORDS;
my $output;
my $tags = shift;
my $qword = $IN->param('query');
my @query = split(/\s/,$qword);
foreach my $match (@query) {
if (exists $STOPWORDS->{$match}) {
$output .= "$match ";
}
}
return $output;
}
Quote Reply
Re: [jaltuve] Search exclusion In reply to
Sorry, I didn't understand: how I have to name that globale? "ingnored"?

And where do I list my stopwords?

Does it work with the <%ignored%>-Tag from search_results.html

Thanks,
Chris
Thanks a lot for your help,
Christian

Quote Reply
Re: [cwschroeder] Search exclusion In reply to
In Reply To:
Sorry, I didn't understand: how I have to name that globale? "ingnored"?

And where do I list my stopwords?

Does it work with the <%ignored%>-Tag from search_results.html

Thanks,
Chris


1) name the global ignored

2) No need to specify the stopwords, they are built into the Links SQL code

3) Yes, Do exactly as I told you in the first post.. just create the global as ignored and you'll see instant results because the ignored tag is already present in the search template.

Cheers,