Skip to main content.
home | support | download

Back to List Archive

Re: Formatting what the user sees...

From: J Medrick Stevenson <jmedrick(at)not-real.cablenetworkz.com>
Date: Mon Mar 13 2006 - 19:17:03 GMT
Thanks for the help Bill!  With your advice, I've figured out how to 
solve my second and third questions but I'm not sure what to do with the 
first one that you answered below.  I can find the section of code you 
suggest in my swish.cgi file but I'm not sure what to do with it.  
Should I comment out the section?  Add something? Any further 
clarification would be most helpful!

Thanks again.
Jen

Bill Moseley wrote:
> On Fri, Mar 10, 2006 at 01:03:04PM -0800, J Medrick Stevenson wrote:
>   
>> 1. I would like to change the wording when there are no results from "no 
>> results" to "No Results Were Found." I am able to successfully change 
>> other errstr messages, such as "Please enter a query string," but I 
>> can't get a change to the no results message to show up. Is this pulled 
>> from some other file?
>> I tried to change the following code, with no success:
>>
>>         # Add in results-related headers
>>         $headers->{'parsed words'} = join ' ', $results->ParsedWords(
>>     ($swish->IndexNames)[0] );
>>
>>         if ( ! $results->Hits ) {
>>             $self->errstr('no results');
>>             return;
>>         }
>>         $headers->{'number of hits'} = $results->Hits;
>>     
>
> "no results" is also reported directly by swish:
>
>     $ swish-e -w dkdkd
>     # SWISH format: 2.5.4
>     # Search words: dkdkd
>     # Removed stopwords: 
>     err: no results
>     .
>
>
> So, maybe it's in the code right above?
>
>     if ( $swish->Error ) {
>         $self->errstr( join ': ', $swish->ErrorString, $swish->LastErrorMsg );
>         delete $cached_handles{$indexes} if $swish->CriticalError;
>         return;
>     }
>
>   
Received on Mon Mar 13 11:17:16 2006