Skip to main content.
home | support | download

Back to List Archive

modifiying results in the search.cgi page, using swish api

From: <Deepesh_Banerji(at)>
Date: Wed May 26 2004 - 18:52:03 GMT
Good afternoon,

I'm using Swish-e 2.4.2, and I have my site searching using a swish.cgi
file that is using the Swish-e API for perl. In my swish.cgi, I'd like to
make a slight tweak. When the results are returned, I'd like to make a
change to the Title of each result link. Basically i'd like to strip off a
certain piece of text from it.


#remove from the titles of the pages

while ( my $result = $results->NextResult ) {
     my $doctitle = $result->Property( "swishtitle" );
     $doctitle =~ s/SOME TEXT - / /g;  # Replace some piece of text from my
     $result->Property( "swishtitle" ) = $doctitle;

However, this doesn't work because in the last line, it doesn't let me edit
the Property "swishtitle" directly. What method can I call to change that


Received on Wed May 26 11:52:04 2004