PluceneSimple - Failed test docids

Posted on Fri Mar 25 10:41:32 2005 by zby
Failed test docids
Hi, I tried to install Plucene and the docids test failed. I modified the test like bellow to show the exact problem:
#------------------------------------------------------------------------------ # Tests #------------------------------------------------------------------------------ build_index(); my $index = Plucene::Simple->open($dir); my @ids = $index->search("me"); is_deeply \@ids, [ 0, 3 ], "Correct ids returned"; print Dumper(@ids); build_index(1); $index = Plucene::Simple->open($dir); @ids = $index->search("me"); is_deeply \@ids, [ 0, 3 ], "Correct ids returned (after deleting them and reindexing)" or print Dumper(@ids);
I added a Data::Dumper::Simple dumps to the @ids array. And the result is:
1..2 ok 1 - Correct ids returned @ids = ( '0', '3' ); not ok 2 - Correct ids returned (after deleting them and reindexing) # Failed test (t/docids.t at line 66) # Structures begin differing at: # $got->[1] = '0' # $expected->[1] = '3' @ids = ( '0', '0', '3' ); # Looks like you failed 1 test of 2.
So it seems that the first item is double represented in the list.
Write a response