--- EPrints/index.pl 2007/06/29 09:21:11 3 +++ EPrints/index.pl 2007/06/29 14:53:14 8 @@ -7,8 +7,6 @@ use lib '/home/dpavlin/stem-hr/'; use StemHR; -warn dump( StemHR->stem('kuæni') ); - my $debug = shift @ARGV; my $dbh = EPrints->dbh; @@ -32,7 +30,7 @@ maximum_word_length => 15 ); # use this encoding for any incoming text -$indexer->set_default_encoding( "utf8"); +$indexer->set_default_encoding( "iso-8859-2" ); my $total = 0; @@ -44,11 +42,13 @@ EPrints->lookup( 'abstract' ) ); my @body = split( /\W*\s+\W*/, "$title $title $title $keywords $keywords $abstract" ); - my $body; + my $body = ''; foreach my $word ( @body ) { $body .= StemHR->stem( $word ) . ' '; } + $body .= EPrints::slogovi( "$title $keywords $abstract" ); + warn "body: $body\n" if $debug; $indexer->index( $row->{id}, join(" ", @body, $body ) );