Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search Results Problem

Quote Reply
Search Results Problem
Hi,

I have a problem with the search for our Links SQL. We are using INTERNAL indexing for the links, and one of our listings has the following type of name in the title: c2 New York

When I do a search directory (...search.cgi?query=c2), then it doesn't come up. But if I put in the search term New York (...search.gi?query=New+York), then it does come up.

Also, if I specify just the Title field:

...search.cgi?Title=c2

Then the listing comes up. But as menetioned above with the regular query:

...search.cgi?query=c2

Then the listing doesn't come up. I did re-build the search index, and I checked to make sure that the Title field has a Search Weight set (it is set to 3).

Does anybody have any idea why this might happen?

--FrankM
Quote Reply
Re: [FrankM] Search Results Problem In reply to
I'm guessing the problem lies in the fact that there is a number "2" in the search query.

Under setup->search options you could try to edit build_sort_order_search to "score, Title"...

Very strange...

- Jonathan
Quote Reply
Re: [jdgamble] Search Results Problem In reply to
Thanks very much, I'll check that out. I'm thinking now that the problem might be something with minimum word size. I found the following file called Indexer.pm:

GT > SQL > Search > Base > Indexer.pm

It has the following parameter:

min_word_size => 3

I changed that value from 3 to 1 and reindexed, but unfortunately, it still doesn't show up on the basic query=c2 search...

I think that there is probably something in this Indexer.pm or Common.pm in the same directory that doesn't allow a single digit for a search, or something like that. Unfortunately, I'm pretty bad at PERL, so I can't figure out how to override it...
Quote Reply
Re: [FrankM] Search Results Problem In reply to
I tested this on my site and it works fine:

http://www.magicdirectory.com/.../search.cgi?query=c6

What version of linksSQL are you using?

- Jonathan
Quote Reply
Re: [jdgamble] Search Results Problem In reply to
Thanks very much for testing that! I fiddled around a little more, and I think the problem was that I wasn't using score for the sort order of the links, but rather was sorting on some custom fields that I have. So, when I switched the indexing scheme to NONINDEXED for the links, then it would pick up the search for c2. I appreciate your help, and seeing that it worked on yours got me on the right track Smile

--Frank
Quote Reply
Re: [FrankM] Search Results Problem In reply to
I think you were on the right track with the min word setting.
You need to change it in
GT > SQL > Search > Base > Indexer.pm
and
GT > SQL > Search > Base > Search.pm

If you leave your indexing as nonindexed you will find that your search is much slower as your database grows - and it will also ignore your weights.
Quote Reply
Re: [afinlr] Search Results Problem In reply to
That was it. I forgot to check the Search.pm in the Base directory.

I changed the 'min_word_size' => 3 to 'min_word_size' => 1 in the Search.pm. Then I changed back to the INTERNAL indexing scheme for the Links table, and then I rebuilt the search index, and now I get results for a search on c2 and can also use the quicker indexed search.

Many thanks to both of you for helping me solve the problem.

--Frank

Last edited by:

FrankM: Sep 14, 2004, 5:00 PM