Skip to main content.
home | support | download

Back to List Archive

Re: Error explanation request

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Oct 08 2002 - 13:24:24 GMT
On Tue, 8 Oct 2002, Juan Francisco Fernandez Carrasco wrote:

> Hi all!!
> 
> I am using swish-e in order to index and access a
> corpus of text.
> I do it from Perl, using Bill Mosseley's module, more
> specifically the "Fork" method and a raw_query call.
> Sometimes I get the next error:
>   "Failed to find end of results"
> I don't understand what it means nor why it happens.

I assume you are talking about the SWISH::Fork module on CPAN?

The 'Failed to find end of results' message just means that the module
did not see the lone dot that is printed at the end of results when
parsing the output from swish.

The raw_query() was for debugging, if I remember correctly, and collects
all lines including the dot at the end, so I guess I'd expect that's why
you are seeing that error.

That can be supressed by editing the _read_results() subroutine in
Fork.pm.  All you need to do is set $eof true either before the while()
loop.

   $eof = 1 if $self->{_raw};

or in the loop

            # Raw output
            if ( $self->{_raw} ) {
                push @{$self->{_raw}}, $line;

                # Detect eof;
                $eof++ if $line =~ m[^\.];  

                next;
            }
    

There's no point in using that module if you are using it to fetch raw
output from swish-e, as the main purpose of that module is to parse the
output from swish-e.

-- 
Bill Moseley moseley@hank.org
Received on Tue Oct 8 13:28:17 2002