Skip to main content.
home | support | download

Back to List Archive

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

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Thu Oct 25 2007 - 18:54:34 GMT
On 10/25/2007 01:24 PM, josh@relativelysane.com wrote:
> actually i mis-quoted what i need here... been playing with perl for a good hour now and can't seem to get it.
> 
> I am in the swish.cgi file - right where it defines the title_property: "title_property => 'swishtitle'," 
> 
> Its there I want to do a if/then statement.. I am sure the problem has something to do with comma's and/or semi-colons; but i tried every combination i could think of ;-)
> 
> Want something like what is below (keeping it to only a few things for testing):
> 
> 
> If ('swishtitle' ne '') {
>       title_property => 'swishtitle';
> } elseif ('strong' ne '') {
>       title_property => 'strong';
> } else {
>       title_property => 'swishdocpath';
> }
> 

Your title property can't be assigned in the config, because you don't know
what it is till after the query has run. I.e., it all depends on the value of
the 'flavor' property for each result. You need to modify where the results are
output, to test for $flavor there.

-- 
Peter Karman  .  peter(at)not-real.peknet.com  .  http://peknet.com/

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Oct 25 14:54:33 2007