--- EPrints/search.cgi 2007/06/30 12:50:56 16 +++ EPrints/search.cgi 2007/07/02 12:55:49 18 @@ -15,6 +15,7 @@ use Data::Dump qw/dump/; use EPrints; use Cwd qw/abs_path/; +use KinoSearch::Simple; use lib '/home/dpavlin/stem-hr/'; use StemHR; @@ -39,6 +40,7 @@ my $similar = $cgi->param( 'similar' ) || ''; my $slogovi = $cgi->param( 'slogovi' ) || ''; my $stem = $cgi->param( 'stem' ) || ''; +my $kino = $cgi->param( 'kino' ); my $charset='iso-8859-2'; @@ -79,9 +81,30 @@ database => "$abs_path/eprints.db", collection => $COLLECTION ); + my $score_ponder; + my ($results, $terms); if ( $query ) { ($results, $terms) = $semantic->semantic_search( $full_query ); + + my $kino = KinoSearch::Simple->new( + path => 'kinoindex/', + language => 'ru', + ); + + my $total_hits = $kino->search( + query => $query, + offset => 0, + num_wanted => 10, + ); + + print qq|
$i. ", EPrints->lookup( 'title' ), ""; + print "
$i. ", EPrints->lookup( 'title' ), ""; print "| score: ", sprintf("%.2f",$results->{$id}), " | id: $id | similar | "; my ($type,$uri) = EPrints->fulltext; print qq|$type|;