Skip to main content.
home | support | download

Back to List Archive

Re: MetaName searching in new API

From: Bill Moseley <moseley(at)>
Date: Mon Mar 03 2003 - 17:24:06 GMT
On Mon, 3 Mar 2003, Thomas R. Bruce wrote:

> > If you really mean "throws an error" then the module does not do that[1].
> Forgive the imprecision of language.  I mean "returns no results without any
> complaining on the part of the API error-reporting routine when I
> conscientiously check it".

I'm not sure it does return an error on zero hits.  I think for the API
zero hits is just zero hits, and not a problem with the query or anything

This is what SWISH::API docs show:

           # then in a loop
           my $results = $search->Execute( $query );

           # always check for errors (but aborting is not always necessary)

               if $swish->Error;

           # Display a list of results

           my $hits = $results->Hits;
           if ( !$hits ) {
               print "No Results\n";
               return;  /* for example *.

Although I doubt you want to use C-type comments in Perl! ;)

Bill Moseley
Received on Mon Mar 3 17:24:30 2003