Skip to main content.
home | support | download

Back to List Archive

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

From: <josh(at)>
Date: Fri Oct 26 2007 - 17:44:32 GMT

I really hate to be a pain here - but.... ;-)

So I am in - and I am where $DocTitle is being populated with the title that will show up in the search results..

      my $DocTitle = $results->config('title_property') || 'swishtitle';

So I am 'just' trying (for right now) to get it to show the 'strong' instead of the 'title_property'... So I changed the string to:

      my $DocTitle = $results->Property('strong');

and nothing.. it errors out.. I saw many variations of the '$results->Property' field in the archives - and I tried all of them: $results->property, $res->Property, $res->property, as well as a variation of single and double quotes (again because I saw a mixture in the archives)...

For the life of me I cannot get it to just show that defined PropertyName on the output of the search.... what am I missing here??



>-----Original Message-----
>[] On Behalf Of Peter Karman
>Sent: Thursday, October 25, 2007 2:55 PM
>To: Swish-e Users Discussion List
>Subject: Re: [swish-e] Change the indexed 'title'
>On 10/25/2007 01:24 PM, 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
>> 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
>the 'flavor' property for each result. You need to modify where the results
>output, to test for $flavor there.
>Peter Karman  .  peter(at)  .
>Users mailing list
Users mailing list
Received on Fri Oct 26 13:44:33 2007