--- EPrints/index.pl 2007/06/30 13:46:51 17 +++ EPrints/index.pl 2007/07/02 12:55:49 18 @@ -5,6 +5,7 @@ use Data::Dump qw/dump/; use EPrints qw/_x/; +use KinoSearch::Simple; my $debug = shift @ARGV; my $use = { @@ -40,9 +41,15 @@ my $total = 0; +my $kino = KinoSearch::Simple->new( + path => 'kinoindex/', + language => 'ru', +); + while (my $row = $sth->fetchrow_hashref ) { my $id = $row->{id}; EPrints->id( $id ); + my $parts = { title => [ _x( $row->{title} ), 3 ], keywords => [ EPrints->lookup( 'keywords' ), 2 ], @@ -86,6 +93,13 @@ } $indexer->index( $row->{id}, $body ); + $kino->add_doc({ + id => $id, + title => $parts->{title}, + keywords => $parts->{keywords}, + abstract => $parts->{abstract}, + }); + $total++; print STDERR "$total: ", $row->{id}, " ", _x( $row->{title} ), " - ", length($body), " bytes\n"; }