13 |
use lib './lib'; |
use lib './lib'; |
14 |
use WebPAC; |
use WebPAC; |
15 |
use WebPAC::jsFind; |
use WebPAC::jsFind; |
16 |
|
use WebPAC::Index; |
17 |
|
|
18 |
my $webpac = new WebPAC( |
my $webpac = new WebPAC( |
19 |
code_page => 'ISO-8859-2', |
code_page => 'ISO-8859-2', |
25 |
|
|
26 |
my $index = new WebPAC::jsFind( |
my $index = new WebPAC::jsFind( |
27 |
index_path => './out/index', |
index_path => './out/index', |
28 |
|
keys => 80, |
29 |
) || die; |
) || die; |
30 |
|
|
31 |
|
my $thes; |
32 |
|
|
33 |
$|=1; |
$|=1; |
34 |
|
|
35 |
my $maxmfn = $webpac->open_isis( |
my $maxmfn = $webpac->open_isis( |
94 |
); |
); |
95 |
} |
} |
96 |
|
|
97 |
|
# save into sorted index (thesaurus) |
98 |
|
foreach my $ds (@ds) { |
99 |
|
next if (! $ds->{'index'}); |
100 |
|
|
101 |
|
$thes->{$ds->{'tag'}} ||= new WebPAC::Index; |
102 |
|
|
103 |
|
$thes->{$ds->{'tag'}}->insert( |
104 |
|
path => $f, |
105 |
|
headline => $headline, |
106 |
|
); |
107 |
|
} |
108 |
|
|
109 |
# print Dumper(\@ds); |
# print Dumper(\@ds); |
110 |
|
|
111 |
} |
} |
113 |
if ($log->is_debug) { |
if ($log->is_debug) { |
114 |
$log->debug("lookup hash: ",Dumper($webpac->{'lookup'})); |
$log->debug("lookup hash: ",Dumper($webpac->{'lookup'})); |
115 |
$log->debug("data hash: ",Dumper($webpac->{'data'})); |
$log->debug("data hash: ",Dumper($webpac->{'data'})); |
116 |
|
foreach my $t (keys %{$thes}) { |
117 |
|
$log->debug("thesaurus $t hash: ",Dumper($thes->{$t})); |
118 |
|
} |
119 |
} |
} |
120 |
|
|
121 |
$index->close; |
$index->close; |