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

Questions about Indexed Search (Search.pm)

Quote Reply
Questions about Indexed Search (Search.pm)
I have a few questions about Search.pm
First, there is a variable defined as language => 'en'. Actually, my site uses another
language, portuguese.
Do this affect something, so I should change 'en' to 'br' or 'pt'?

Second, itīs regarding Stop Words! I still have the default words. So, if I search for
'arts of Brazil' I get the <%ignored%> tag clean in the search results, but I see that
it doesnt searchs for 'of'. But, if my query is just 'of', I get an search error of course, but
the tag <%ignored%> is not clean! Is this a bug or something?

Third, I allways get an or search. It appears to donīt look at the bool entered.

Fourth, I read somewhere that it supports Altavista like search, so I can use +word and -word
right? But does it support full boolean expression, I mean "Arts AND (Brazil OR USA)" for example?


Thanks a lot!!!
Quote Reply
Re: Questions about Indexed Search (Search.pm) In reply to
The language part was start of trying to get localization support into the module. Right now it doesn't do too anything. In the future, it will hopefully give you errors depending on what location you are in.

Right now though, what may interest you is the Keyword_Drop_En hash:

Code:
my %KEYWORD_DROP_EN = (
STOPWORD => "Stop word",
PHONENUMBER => "Phone number",
ALPHANUMER => "Lacks alphnumerics",
TOOSMALL => "Too Small",
TOOBIG => "Too Big",
TOOMANY => "Too Many"
);

You can change that to the language of your preference.

#2. if you have the default stopword list, of is the first element in the list. otherwise, perhaps it is because the word is too small.

#3/4. it's the old-style altavista syntax, +word +startswith* -canthave -cantstart* +"is phrase...," that the search module supports.

We have looked at the new style syntax, but that would mean a whole new parser (a true parser, not a cheating, but functional one that I use) and much more bookwork (creating evaluation trees and the performing them).

If we had more resources, it would be done, but right now we are extremely stretched so for the time being that addition has been shelved.

hope that helps
Quote Reply
Re: Questions about Indexed Search (Search.pm) In reply to
Thanks a lot aki...

Well, in #2, i dont see any problem, what i was trying to say is why it appears in the <%ignored%> tag when the search fails and dont appear in the search results.
I would like to show the visitor that the word "of" (in this case) wasnt used in the search!!!!



[This message has been edited by tmoretti (edited December 22, 1999).]