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..."; |