Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Change the indexed 'title'

From: Michael Peters <mpeters(at)>
Date: Thu Oct 25 2007 - 18:53:12 GMT wrote:

> If ('swishtitle' ne '') {
>       title_property => 'swishtitle';
> } elseif ('strong' ne '') {
>       title_property => 'strong';
> } else {
>       title_property => 'swishdocpath';
> }

You're trying to compare 2 literal strings. That's like saying "if 3 == 4" which
will never be true. You need to compare a variable to a string. But I'm not sure
 that's the right place to do what you're trying to do.

What you want is not to tell swish-e which field to use as the title (since it
will use the same value for all documents). You want to tell the CGI (or the
Template) to use either the title, strong or path as the thing that get's shown
as the title. The syntax in Perl looks like this:

  my $title = $swishtitle or $strong or $swishdocpath;

I don't have swish.cgi handy (nor do I use it) but look for the place where the
templates are filled or where the data is retrieved from swish-e.

Michael Peters
Plus Three, LP

Users mailing list
Received on Thu Oct 25 14:53:49 2007