Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Search for short words like 'ADD' not working

Quote Reply
Search for short words like 'ADD' not working
Hi all,

I've got a Links 1.13 search issue. We try to find the word 'ADD'. Its in a field called 'comments' that we added to the database. Other terms in this field are being found, ones that are longer.

What should I be checking to make sure that first of all the 'comments' field is being checked during searches, and second to make sure that words as short as 3 characters are being searched?

David

Quote Reply
Re: Search for short words like 'ADD' not working In reply to
I don't know why this is hard-coded in the Search.pm...but you will need to look in multiple places for the following codes:

Code:

length $word < 2


Change the value to something higher.

There are multiple places where this is found...make sure you get them all.

You could also add a global variable (not tag) in the Links.pm module like the following:

Code:

$LINKS{min_words} = 3;


Then in the codes I posted previously, change 2 to $LINKS{min_words}.

Regards,

Eliot Lee
Quote Reply
Re: Search for short words like 'ADD' not working In reply to
In addition to Eliots reply, there are also 'Stop Words' in search.pm that are ignored by the search process, look for:

Code:
my %STOPWORDS_EN = map { $_ => 1} qw!.....
You'll notice that add is one of them! Try temporarily removing 'add' from the stop words list and see if it finds it in the search results, it should.

Hope this helps.

All the best
Shaun