/[nn]/search/nn-swish.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 /search/nn-swish.cgi

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

revision 1.1 by dpavlin, Wed Jun 19 15:27:28 2002 UTC revision 1.2 by dpavlin, Wed Jun 19 18:04:12 2002 UTC
# Line 24  if (param('search')) { Line 24  if (param('search')) {
24          my $sh = SWISH->connect('Fork',          my $sh = SWISH->connect('Fork',
25                  prog     => "$dir/swish-e",                  prog     => "$dir/swish-e",
26                  indexes  => "$dir/nn.index",                  indexes  => "$dir/nn.index",
27                  results  => sub { print $_[1]->as_string,"\n" },                  results  => sub {
28                            my ($sh, $hit) = @_;
29    
30                            print $hit->swishreccount, '<a href="',$hit->swishdocpath,"'>",$hit->swishtitle,"</a> [",$hit->swishrank,"]<br>\n";
31    
32    #                       print $_[1]->as_string,"\n";
33    #                       my @fields = $hit->field_names;
34    #                       print "Field '$_' = '", $hit->$_, "'<br>\n" for sort @fields;
35                    },
36          );          );
37    
38          die $SWISH::errstr unless $sh;          die $SWISH::errstr unless $sh;
39    
40          $hits = $sh->query($s);          $hits = $sh->query("naslov_czs=($s)");
41    
42          if ($hits > 0) {          if ($hits > 0) {
43                  print p,hr,"Našeno je $hits zakona...";                  print p,hr,"Našeno je $hits zakona...";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26