I just tried all possible combinations of index files, and it turns out
that all individual indexes work fine, and any pair (or the triple) gives
the same error message. So it is not one 'faulty' index, it must be
something general.
Jonas
Peter Karman <karman@cray.com>
17-06-04 14:59
Please respond to karman
To: Jonas Wolf/UK/IBM@IBMGB
cc:
Subject: Re: [SWISH-E] Re: searching several indexes with
SWISH::API
mine was just a copy/paste from the SWISH::API man page with a little
tweak to let me run it from the cmd line:
my $indx = shift @ARGV;
my $swish = SWISH::API->new( $indx );
$swish->AbortLastError
if $swish->Error;
I called it like:
swishtest '/path/index1 /path/index2' -w test
and it searched both indexes just fine.
Have you tried different combinations to see if there's one index in
particular that causes the failure?
pek
Jonas Wolf wrote on 06/17/2004 08:49 AM:
> Could you please send the fragment of your code which handles the
> SWISH-API calls? I do the following:
>
> # concatenate all index files
> my @indexarr;
> foreach my $key (keys %{$params{indexes}})
> {
> push @indexarr, $params{indexes}{$key}{index}{$fuzzy ? 'fuzzy' :
> 'normal'};
> }
> my $indexlist = join ' ', @indexarr;
>
> $params{indexes} contains several indexes, each with the path leading to
a
> 'normal' and a 'fuzzy' index. Thus $indexlist contains a space separated
> list of index filenames (full paths) after this code (I know it could be
> done better but it should still work). I pass this variable to another
> function which then essentially calls
>
> $swish = SWISH::API->new( $indexlist );
> die "Failed to create SWISH::API object" unless $swish;
> $swish->AbortLastError if $swish->Error;
>
> Thanks, Jonas
>
>
>
> I just tried a similar test with SWISH::API and it worked fine too. So I
> doubt that metanames/properties diffs are the problem.
>
> Jonas Wolf wrote on 06/17/2004 07:40 AM:
>
>>They are all not stemmed, so that should not be the problem. However,
>
> they
>
>>they certainly have different metanames and properties defined. Is this
>
> a
>
>>problem, and if yes, is there any way to get around this problem?
>>
>>Jonas
>>
>>
>>
>>Do all three indexes have identical metanames/properties defined?
>>
>>I see that error in the metanames.c file and I wonder if there is a
>>problem trying to search all three indexes if they have different header
>
>
>>info? Or is stemming on in one of them?
>>
>>pek
>>
>>
>>Jonas Wolf wrote on 06/17/2004 05:59 AM:
>>
>>
>>>Hi,
>>>
>>>I have been using SWISH::API happily to search three individual
indexes.
>
>
>>
>>>Now I want to search all of them at the same time, as specified in the
>>>SWISH::API documentation. However, when passing the index files as a
>>
>>space
>>
>>
>>>separated string, I get the following error message:
>>>
>>>err: Index Header Error: Index file
>>>'d:/website2/cgi-bin/search/index/pmr/nostem.idx
>>>d:/website2/cgi-bin/search/index/prb/nostem.idx
>>>d:/website2/cgi-bin/search/index/manuals/nostem.idx' is not an active
>>>index file
>>>.
>>>
>>>The three individual indexes exist and can be searched without a
>>
>>problem.
>>
>>
>>>Can someone shed more light on what exactly this error message means
and
>
>
>>
>>>what I might be doing wrong?
>>>
>>>Thank you, Jonas.
>>
>>
>
--
Peter Karman - Software Publications Programmer - Cray Inc
phone: 651-605-9009 - mailto:karman@cray.com
Received on Thu Jun 17 15:04:56 2004