Mailing List Archive

Error trying to merge invindexes
Error in function refill at ../c_src/KinoSearch/Store/InStream.c:95:
Read past EOF of seg_1.tvx (start: 16 len 16)
at /home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/TermVectorsWriter.pm
line 54
KinoSearch::Index::TermVectorsWriter::add_segment('KinoSearch::Index::TermVectorsWriter=SCALAR(0x85fbc64)',
'KinoSearch::Index::SegReader=SCALAR(0x85fc2b4)',
'KinoSearch::Util::IntMap=SCALAR(0x85fc1c4)') called at
/home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/SegWriter.pm
line 112
KinoSearch::Index::SegWriter::add_segment('KinoSearch::Index::SegWriter=SCALAR(0x85fbb5c)',
'KinoSearch::Index::SegReader=SCALAR(0x85fc2b4)') called at
/home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/InvIndexer.pm
line 171
KinoSearch::InvIndexer::add_invindexes('KinoSearch::InvIndexer=SCALAR(0x85d9464)',
'KinoSearch::InvIndex=SCALAR(0x85fbed0)',
'KinoSearch::InvIndex=SCALAR(0x85fc0a4)') called at merge.pl line 13

Do you need any more information?
--
Edward.

_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
Re: Error trying to merge invindexes [ In reply to ]
I'm running r3472. I've written a minimal test case:

#!/usr/bin/perl
use strict;
use warnings;
use lib </home/edward/svn/kinosearch/perl/blib/{arch,lib}>;
use KinoSearch::InvIndexer;

package Location;
use base qw( KinoSearch::FieldSpec::text );
sub indexed { 0 }
sub analyzed { 0 }

package Schema;
use base qw( KinoSearch::Schema );

use KinoSearch::Analysis::PolyAnalyzer;

our %fields = ( location => 'Location' );

sub analyzer {
KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' );
}

package main;

my $invindexer = KinoSearch::InvIndexer->new(
invindex => Schema->clobber('index1'),
);
$invindexer->add_doc({ location => 'x' });
$invindexer->finish();

$invindexer = KinoSearch::InvIndexer->new(
invindex => Schema->clobber('index2'),
);
$invindexer->add_invindexes(Schema->read('index1'));
$invindexer->finish();

I get this error:

Error in function refill at ../c_src/KinoSearch/Store/InStream.c:95:
Read past EOF of seg_1.tvx (start: 16 len 16)
at /home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/TermVectorsWriter.pm
line 54
KinoSearch::Index::TermVectorsWriter::add_segment('KinoSearch::Index::TermVectorsWriter=SCALAR(0x85f3824)',
'KinoSearch::Index::SegReader=SCALAR(0x85f37d0)',
'KinoSearch::Util::IntMap=SCALAR(0x85ff830)') called at
/home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/SegWriter.pm
line 112
KinoSearch::Index::SegWriter::add_segment('KinoSearch::Index::SegWriter=SCALAR(0x85f37b8)',
'KinoSearch::Index::SegReader=SCALAR(0x85f37d0)') called at
/home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/InvIndexer.pm
line 171
KinoSearch::InvIndexer::add_invindexes('KinoSearch::InvIndexer=SCALAR(0x85f36a4)',
'KinoSearch::InvIndex=SCALAR(0x85f4c98)') called at test_merge.pl line
35

--
Edward.

_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
Re: Error trying to merge invindexes [ In reply to ]
I just tried my test case with r3535. No error. Sorry for wasting your time.

2008/6/25 Edward Betts <edwardbetts@gmail.com>:
> I'm running r3472. I've written a minimal test case:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use lib </home/edward/svn/kinosearch/perl/blib/{arch,lib}>;
> use KinoSearch::InvIndexer;
>
> package Location;
> use base qw( KinoSearch::FieldSpec::text );
> sub indexed { 0 }
> sub analyzed { 0 }
>
> package Schema;
> use base qw( KinoSearch::Schema );
>
> use KinoSearch::Analysis::PolyAnalyzer;
>
> our %fields = ( location => 'Location' );
>
> sub analyzer {
> KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' );
> }
>
> package main;
>
> my $invindexer = KinoSearch::InvIndexer->new(
> invindex => Schema->clobber('index1'),
> );
> $invindexer->add_doc({ location => 'x' });
> $invindexer->finish();
>
> $invindexer = KinoSearch::InvIndexer->new(
> invindex => Schema->clobber('index2'),
> );
> $invindexer->add_invindexes(Schema->read('index1'));
> $invindexer->finish();
>
> I get this error:
>
> Error in function refill at ../c_src/KinoSearch/Store/InStream.c:95:
> Read past EOF of seg_1.tvx (start: 16 len 16)
> at /home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/TermVectorsWriter.pm
> line 54
> KinoSearch::Index::TermVectorsWriter::add_segment('KinoSearch::Index::TermVectorsWriter=SCALAR(0x85f3824)',
> 'KinoSearch::Index::SegReader=SCALAR(0x85f37d0)',
> 'KinoSearch::Util::IntMap=SCALAR(0x85ff830)') called at
> /home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/Index/SegWriter.pm
> line 112
> KinoSearch::Index::SegWriter::add_segment('KinoSearch::Index::SegWriter=SCALAR(0x85f37b8)',
> 'KinoSearch::Index::SegReader=SCALAR(0x85f37d0)') called at
> /home/edward/svn/kinosearch/perl/blib/lib/KinoSearch/InvIndexer.pm
> line 171
> KinoSearch::InvIndexer::add_invindexes('KinoSearch::InvIndexer=SCALAR(0x85f36a4)',
> 'KinoSearch::InvIndex=SCALAR(0x85f4c98)') called at test_merge.pl line
> 35
>
> --
> Edward.
>



--
Edward.

_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
Re: Re: Error trying to merge invindexes [ In reply to ]
On Jun 25, 2008, at 5:31 AM, Edward Betts wrote:

> I just tried my test case with r3535. No error. Sorry for wasting
> your time.


I thought that might have fixed things.

I'm grateful as always for the effort and thought that goes into your
thorough test cases.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch