Hi Roman,
At the moment the code expands the query according to what the
Thesaurus.pm code does, which could be configured to do different things.
I have a dictionary file like:
elections : elections poll
district : district electorate
and when someone searchs on "northland" it gets mapped to "northland
district electorate".
Let me explain some background.
I am working on the official New Zealand electoral commission website.
In New Zealand we use different terminology than other countries, for
example Australia (electorate -> district). The idea is to map the
search words as above, in a configurable way. I have set it up so that
the query mapping occours before passing into the main search routine.
This means that the user gets to see what mapping has occoured.
I have tried to incorporate the code in the "Swish-e" way, as a
configurable option. BTW, I like they way configuration files are
essentially Perl hashs. No need to learn a seperate configuration
language :-)
The "best-docs" approach might be good as well actually. I'll have a
look on the list. Thanks for the tip.
Finlay
Roman Chyla wrote:
>hi Finlay,
>
>I am new to theseaurus-in-swish idea. Does your thesaurus expand query
>and show different results? Stating for example
>
>I searched for "query"
>.
>this was found as a similar "term"
>this was found as a "parent term"
>or do you want to repeat searching with this "subordinate term" ?
>
>whatever it does, it might be very useful
>
>Somewhere, in this list, was discussion about checking query words
>against a prepared list of best-docs, ie. searching for "search engine"
>in index of apache documentation, will also return a link to swish-e
>doc, even though the doc was not in the indexed docs itself
>
>roman
>
>
>Finlay Thompson wrote:
>
> > Hi Everyone
> >
> > Im new to this list, and to swish-e in general.
> >
> > I have implemented some basic Thesaurus code, and patched it into the
>swish.cgi script.
> >
> > Has anyone else done this sort of thing ?
> >
> > The swishcgi.conf file has an extra setting like:
> >
> > thesaurus => {
> > package => 'SWISH::Thesaurus',
> > },
> >
> > and the query words are replaced using code:
> >
> > if (my $thesaurus = $self->config('thesaurus')) {
> > my $thesaurus_object = $thesaurus->{package}->new();
> > $query = $thesaurus_object->expand_query($query) if
>$thesaurus_object;;
> > }
> >
> >
> > I would welcome any comments, suggestions.
> >
> > Finlay
> >
> >
> >
>
>
>Finlay Thompson wrote:
>
>
>>Hi Everyone
>>
>>Im new to this list, and to swish-e in general.
>>
>>I have implemented some basic Thesaurus code, and patched it into the
>>swish.cgi script.
>>
>>Has anyone else done this sort of thing ?
>>
>>The swishcgi.conf file has an extra setting like:
>>
>> thesaurus => {
>> package => 'SWISH::Thesaurus',
>> },
>>
>>and the query words are replaced using code:
>>
>> if (my $thesaurus = $self->config('thesaurus')) {
>> my $thesaurus_object = $thesaurus->{package}->new();
>> $query = $thesaurus_object->expand_query($query) if
>>$thesaurus_object;;
>> }
>>
>>
>>I would welcome any comments, suggestions.
>>
>>Finlay
>>
>>
>>
>>
>>
>>
Received on Thu Mar 17 12:47:09 2005