Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search results not accurate

Quote Reply
Search results not accurate
Hello,

This may be something very simple (like my last ?), but I have a listing that is in about 20 related categories. When I search by the name of the site, only one result comes up. This happens with other websites in multiple categories as well. I would like all the results to show. Any ideas?

thanks a lot
Quote Reply
Re: [Chrisp] Search results not accurate In reply to
Are you using mysql indexes and/or have you fully indexed recently?
Quote Reply
Re: [Paul] Search results not accurate In reply to
Hi Paul

Thanks for the quick reply. Yes, I did index recently. It's not really a big deal, but it's just kind of annoying me Smile

thanks

Last edited by:

Chrisp: Mar 18, 2002, 6:25 AM
Quote Reply
Re: [Chrisp] Search results not accurate In reply to
Are you using the internal index or mysql index?

If you are using mysql, try switching to internal.
Quote Reply
Re: [Paul] Search results not accurate In reply to
I know I am using the MYSQL database, but I am not sure what you mean by internal index. How do I find out? I installed the script with default settings, so whatever that is.
Quote Reply
Re: [Chrisp] Search results not accurate In reply to
Go to Database > Links/Properties in the control panel and scroll down. By default it should say "NONINDEXED" ....change it to INTERNAL and reindex
Quote Reply
Re: [Paul] Search results not accurate In reply to
Thanks Paul. Got it!!!
Quote Reply
Re: [Chrisp] Search results not accurate In reply to
Hi,

Actually this is by design. The link only shows up once in the search results even if it is in multiple categories.

It was done to help with people who don't group things by category.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Chrisp] Search results not accurate In reply to
When people "search" for something, they want to find all the links to DIFFERENT sites, not the same link in 20 different categories.... If they "browsed" by category, the link would show up in each category.

You might be able to work a global, if you wanted, that would list the other categories a link was found in.

Depending on how Alex coded the search, you might be able to alter it to show all the hits. It's obviously not as easy as simply removing a "distinct" keyword <G>

Alex would have to comment for sure, but this piece of code from Search.pm seems to take the "hits" and attach the category to them:

Code:


# And format the link results.
my ($link_results, %link_output);
if ($link_count) {
my $results = $link_sth->fetchall_hashref;
$links->add_reviews ($results);
if ($CFG->{build_search_gb}) {
my @ids = map { $_->{ID} } @$results;
my $catlink = $DB->table('CatLinks','Category');
my %names = $catlink->select ('LinkID', 'Full_Name', { LinkID => \@ids })->fetchall_list;
foreach my $link (@$results) {
push @{$link_output{$names{$link->{ID}}}}, $link;
}
}
else {
push @{$link_output{none}}, @$results;
}
}


You'd need to alter it to do a select on the CatLinks TABLE, and if Hits > 1, then you'd need to enter a loop and process each entry. It looks like the key here is LinkID, which means you'd have a problem with multiple entries.

Since you are grouping by category, obviously, you might combine this and the following block of code, grouping the links by category, which should over come the LinkID as key field problem.

But... I'm not sure how this would affect large searches (returning huge amounts of "hits") and span pages.

Search is still pretty much a "black box" to me in Links :)


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.