/[Semantic-Engine]/EPrints/search.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /EPrints/search.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11 by dpavlin, Fri Jun 29 16:58:42 2007 UTC revision 16 by dpavlin, Sat Jun 30 12:50:56 2007 UTC
# Line 37  my $cgi = new CGI; Line 37  my $cgi = new CGI;
37  my $start = $cgi->param( 'start' ) || 0;  my $start = $cgi->param( 'start' ) || 0;
38  my $query = $cgi->param( 'query' ) || '';  my $query = $cgi->param( 'query' ) || '';
39  my $similar = $cgi->param( 'similar' ) || '';  my $similar = $cgi->param( 'similar' ) || '';
40  my $slogovi = $cgi->param( 'slogovi' );  my $slogovi = $cgi->param( 'slogovi' ) || '';
41  my $stem = $cgi->param( 'stem' );  my $stem = $cgi->param( 'stem' ) || '';
42    
43  my $charset='iso-8859-2';  my $charset='iso-8859-2';
44    
45  my $full_query = $query;  my $full_query = $query;
46  $full_query .= " " . EPrints::slogovi( $query ) if ($slogovi);  $full_query .= " " . EPrints->slogovi( $query ) if ($slogovi);
47  $full_query .= " " . StemHR->stem( $query ) if ($stem);  $full_query .= " " . StemHR->stem( $query ) if ($stem);
48    
49  ##############################  ##############################
# Line 61  print qq|<?xml version="1.0" encoding="$ Line 61  print qq|<?xml version="1.0" encoding="$
61  <body>  <body>
62    <form method="get" action="">    <form method="get" action="">
63      <p>      <p>
64        <input type="text" name="query" value="$query" />        Enter bunch of related terms to documents you are trying to find:
65        <input type="submit" />        <br/><input type="text" name="query" value="$query" size="80">
66          <br/><input type="submit" />
67            |, $cgi->checkbox( -name => 'stem' ), $cgi->checkbox( -name => 'slogovi' ), qq|            |, $cgi->checkbox( -name => 'stem' ), $cgi->checkbox( -name => 'slogovi' ), qq|
68      </p>\n|;      </p>\n|;
69    
# Line 117  warn "display results = ", dump( @displa Line 118  warn "display results = ", dump( @displa
118          #       retrieve the title and text          #       retrieve the title and text
119          ##################################          ##################################
120          my $i = 1 + $start;          my $i = 1 + $start;
121          print $semantic->paginate( "?query=$query;similar=$similar", $start, scalar keys %$results, $RESULTS_TO_DISPLAY);          print $semantic->paginate( "?query=$query;similar=$similar;stem=$stem;slogovi=$slogovi", $start, scalar keys %$results, $RESULTS_TO_DISPLAY);
122          foreach my $id ( @display_results ){          foreach my $id ( @display_results ){
123                  EPrints->id( $id );                  EPrints->id( $id );
124                  print "<p>$i. <b>", EPrints->lookup( 'title' ), "</b>";                  print "<p>$i. <b>", EPrints->lookup( 'title' ), "</b>";
125                  print "| score: <em>", sprintf("%.2f",$results->{$id}), "</em> | id: $id | <a href=\"?similar=$id\">similar</a> | ";                  print "| score: <em>", sprintf("%.2f",$results->{$id}), "</em> | id: $id | <a href=\"?similar=$id\">similar</a> | ";
126                  my ($type,$uri) = split(/;/, EPrints->lookup( 'fileinfo', 'archive' ));                  my ($type,$uri) = EPrints->fulltext;
127                  print qq|<a href="$uri">$type</a>|;                  print qq|<a href="$uri">$type</a>|;
128                  print "</p>\n";                  print "</p>\n";
129                  print "<p>";                  print "<p>";

Legend:
Removed from v.11  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26